protected function DatabaseSchema_sqlsrv::processField in Drupal driver for SQL Server and SQL Azure 7
Same name and namespace in other branches
- 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::processField()
- 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::processField()
Set database-engine specific properties for a field.
Parameters
$field: A field description array, as specified in the schema documentation.
3 calls to DatabaseSchema_sqlsrv::processField()
- DatabaseSchema_sqlsrv::addField in sqlsrv/
schema.inc - Override DatabaseSchema::addField().
- DatabaseSchema_sqlsrv::changeField in sqlsrv/
schema.inc - Override DatabaseSchema::changeField().
- DatabaseSchema_sqlsrv::createTableSql in sqlsrv/
schema.inc - Generate SQL to create a new table from a Drupal schema definition.
File
- sqlsrv/
schema.inc, line 322 - Database schema code for Microsoft SQL Server database servers.
Class
Code
protected function processField($field) {
if (!isset($field['size'])) {
$field['size'] = 'normal';
}
// Set the correct database-engine specific datatype.
if (!isset($field['sqlsrv_type'])) {
$map = $this
->getFieldTypeMap();
$field['sqlsrv_type'] = $map[$field['type'] . ':' . $field['size']];
}
if ($field['type'] == 'serial') {
$field['identity'] = TRUE;
}
return $field;
}