Schema::getFieldTypeMap

public Schema::getFieldTypeMap()

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

Overrides Schema::getFieldTypeMap

File

core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 207

Class

Schema
SQLite implementation of \Drupal\Core\Database\Schema.

Namespace

Drupal\Core\Database\Driver\sqlite

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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_ascii:normal' => 'VARCHAR',
 
    '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;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.