You are here

function data_get_pk_definition in Data 6

Same name and namespace in other branches
  1. 8 data.module \data_get_pk_definition()
  2. 7 data.module \data_get_pk_definition()

Get a Schema API PK definition for a given field type.

1 call to data_get_pk_definition()
data_ui_create_form_submit in data_ui/data_ui.admin.inc
Submit handler for create table form.

File

./data.module, line 226
Hooks and API functions for data module.

Code

function data_get_pk_definition($field_name, $spec) {
  if ($spec['type'] == 'text') {
    return array(
      $field_name,
      255,
    );
  }
  else {
    return $field_name;
  }
}