You are here

function date_api_database_info in Date 7

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_api_database_info()
  2. 7.3 date_api/date_api.module \date_api_database_info()
  3. 7.2 date_api/date_api.module \date_api_database_info()

Temporary helper to re-create equivalent of content_database_info.

3 calls to date_api_database_info()
date_field_get_sql_handler in ./date.module
Generate a DateAPI SQL handler for the given CCK date field.
date_handler_field_multiple::pre_render in date_views/includes/date_handler_field_multiple.inc
Run before any fields are rendered.
_date_views_fields in date_views/includes/date_views_fields.inc
Identify all potential date/timestamp fields.

File

date_api/date_api.module, line 1912
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

Code

function date_api_database_info($field) {
  $data = $field['storage']['details']['sql'][FIELD_LOAD_CURRENT];
  $db_info = array(
    'columns' => $data,
  );
  $current_table = _field_sql_storage_tablename($field);
  $revision_table = _field_sql_storage_revision_tablename($field);
  $db_info['table'] = $current_table;
  return $db_info;
}