public function DatabaseSchema_sqlite::getFieldTypeMap

7.x schema.inc public DatabaseSchema_sqlite::getFieldTypeMap()

This maps a generic data type in combination with its data size to the engine-specific data type.

Overrides DatabaseSchema::getFieldTypeMap

2 calls to DatabaseSchema_sqlite::getFieldTypeMap()
DatabaseSchema_sqlite::introspectSchema in drupal-7.x/includes/database/sqlite/schema.inc
Find out the schema of a table.
DatabaseSchema_sqlite::processField in drupal-7.x/includes/database/sqlite/schema.inc
Set database-engine specific properties for a field.

File

drupal-7.x/includes/database/sqlite/schema.inc, line 192
Database schema code for SQLite databases.

Class

DatabaseSchema_sqlite

Code

public function getFieldTypeMap() {
  // Put :normal last so it gets preserved by array_flip. This makes
  // it much easier for modules (such as schema.module) to map
  // database types back into schema types.
  // $map does not use drupal_static as its value never changes.
  static $map = array(
    'varchar:normal' => 'VARCHAR',
    'char:normal' => 'CHAR',

    'text:tiny' => 'TEXT',
    'text:small' => 'TEXT',
    'text:medium' => 'TEXT',
    'text:big' => 'TEXT',
    'text:normal' => 'TEXT',

    'serial:tiny' => 'INTEGER',
    'serial:small' => 'INTEGER',
    'serial:medium' => 'INTEGER',
    'serial:big' => 'INTEGER',
    'serial:normal' => 'INTEGER',

    'int:tiny' => 'INTEGER',
    'int:small' => 'INTEGER',
    'int:medium' => 'INTEGER',
    'int:big' => 'INTEGER',
    'int:normal' => 'INTEGER',

    'float:tiny' => 'FLOAT',
    'float:small' => 'FLOAT',
    'float:medium' => 'FLOAT',
    'float:big' => 'FLOAT',
    'float:normal' => 'FLOAT',

    'numeric:normal' => 'NUMERIC',

    'blob:big' => 'BLOB',
    'blob:normal' => 'BLOB',
  );
  return $map;
}