SilverStripe\SQLite\SQLite3SchemaManager
SQLite schema manager class
Synopsis
class SQLite3SchemaManager
extends DBSchemaManager
{
- // members
- protected SQLite3Database $database = NULL;
- protected static boolean $checked_and_repaired = false;
- public static boolean $vacuum = true;
- protected array $enum_map = ;
- // methods
- public void createDatabase()
- public void dropDatabase()
- public void databaseList()
- public void databaseExists()
- public void flushCache()
- public void schemaUpdate()
- public void clearTable()
- public void createTable()
- public void alterTable()
- public void renameTable()
- public void checkAndRepairTable()
- public void createField()
- public void alterField()
- public void renameField()
- public void fieldList()
- public void createIndex()
- public void alterIndex()
- protected string buildSQLiteIndexName()
- public void indexKey()
- protected void convertIndexSpec()
- public void indexList()
- public void tableList()
- public string boolean()
- public string date()
- public string decimal()
- public string enum()
- public string set()
- public string float()
- public string double()
- public string int()
- public string bigint()
- public string datetime()
- public string text()
- public string time()
- public string varchar()
- public void year()
- public void IdColumn()
- public void hasTable()
- public array enumValuesForField()
- public void dbDataType()
Hierarchy
Extends
- SilverStripe\ORM\Connect\DBSchemaManager
Members
protected
- $checked_and_repaired
—
boolean
Flag indicating whether or not the database has been checked and repaired - $database
—
SilverStripe\SQLite\SQLite3Database
Instance of the database controller this schema belongs to - $enum_map
—
array
Cached list of enum values indexed by table.column
public
- $vacuum
—
boolean
Should schema be vacuumed during checkeAndRepairTable?
Methods
protected
- buildSQLiteIndexName() — Builds the internal SQLLite index name given the silverstripe table and index name.
- convertIndexSpec()
public
- IdColumn()
- alterField() — Change the database type of the given field.
- alterIndex()
- alterTable()
- bigint() — Return a bigint type-formatted string
- boolean() — Return a boolean type-formatted string
- checkAndRepairTable()
- clearTable() — Empty a specific table
- createDatabase()
- createField()
- createIndex() — Create an index on a table.
- createTable()
- databaseExists()
- databaseList()
- date() — Return a date type-formatted string
- datetime() — Return a datetime type-formatted string For SQLite3, we simply return the word 'TEXT', no other parameters are necessary
- dbDataType()
- decimal() — Return a decimal type-formatted string
- double() — Return a Double type-formatted string
- dropDatabase()
- enum() — Return a enum type-formatted string
- enumValuesForField() — Return enum values for the given field
- fieldList()
- float() — Return a float type-formatted string
- flushCache() — Empties any cached enum values
- hasTable()
- indexKey()
- indexList()
- int() — Return a int type-formatted string
- renameField()
- renameTable()
- schemaUpdate()
- set() — Return a set type-formatted string This type doesn't exist in SQLite either
- tableList()
- text() — Return a text type-formatted string
- time() — Return a time type-formatted string
- varchar() — Return a varchar type-formatted string
- year()