Skip navigation
Help

field_sql_storage_field_storage_details

7 field_sql_storage.module field_sql_storage_field_storage_details($field)

Implements hook_field_storage_details().

File

drupal/modules/field/modules/field_sql_storage/field_sql_storage.module, line 707
Default implementation of the field storage API.

Code

function field_sql_storage_field_storage_details($field) {
  $details = array();
  if (!empty($field['columns'])) {
    // Add field columns.
    foreach ($field['columns'] as $column_name => $attributes) {
      $real_name = _field_sql_storage_columnname($field['field_name'], $column_name);
      $columns[$column_name] = $real_name;
    }
    return array(
      'sql' => array(
        FIELD_LOAD_CURRENT => array(
          _field_sql_storage_tablename($field) => $columns,
        ), 
        FIELD_LOAD_REVISION => array(
          _field_sql_storage_revision_tablename($field) => $columns,
        ),
      ),
    );
  }
}