function schema_engine_type in Schema 5
Same name and namespace in other branches
- 8 schema.module \schema_engine_type()
- 6 schema.module \schema_engine_type()
- 7 schema.module \schema_engine_type()
2 calls to schema_engine_type()
File
- ./
schema.module, line 155
Code
function schema_engine_type($col, $table, $field, $engine = NULL) {
$map = schema_engine_invoke($engine, 'engine_type_map');
$size = isset($col['size']) ? $col['size'] : 'normal';
$type = $col['type'] . ':' . $size;
if (isset($map[$type])) {
return $map[$type];
}
else {
drupal_set_message(t('%table.%field: no %engine type for Schema type %type.', array(
'%engine' => $engine,
'%type' => $type,
'%table' => $table,
'%field' => $field,
)), 'error');
return $col['type'];
}
}