SilverStripe\MSSQL\MSSQLSchemaManager
Represents and handles all schema management for a MS SQL database
Synopsis
class MSSQLSchemaManager
extends DBSchemaManager
{
- // members
- protected static array $cached_checks = ;
- // methods
- public string buildMSSQLIndexName()
- public void createFullTextCatalog()
- public boolean fullTextCatalogExists()
- public void waitUntilIndexingFinished()
- public boolean fulltextIndexExists()
- public string getPrimaryKey()
- public string|null getIdentityColumn()
- public void createDatabase()
- public void dropDatabase()
- public void databaseExists()
- public void databaseList()
- public string createTable()
- public void alterTable()
- public string|null getConstraintName()
- public string getConstraintCheckClause()
- protected string|null defaultConstraintName()
- protected array enumValuesFromCheckClause()
- protected void alterTableAlterColumn()
- public void renameTable()
- public boolean checkAndRepairTable()
- public void createField()
- public void alterField()
- public void renameField()
- public void fieldList()
- public void createIndex()
- protected string getIndexSqlDefinition()
- public void alterIndex()
- public array indexList()
- public array indexNames()
- public void tableList()
- public string boolean()
- public string date()
- public string decimal()
- public string enum()
- public string set()
- public string float()
- public string int()
- public string bigint()
- public string datetime()
- public string text()
- public string time()
- public string varchar()
- public string year()
- public string IdColumn()
- public void hasTable()
- public array enumValuesForField()
- public string dbDataType()
- protected void indexKey()
Hierarchy
Extends
- SilverStripe\ORM\Connect\DBSchemaManager
Tasks
Line | Task |
---|---|
391 | this returns an empty array for the following string: int(11) not null auto_increment |
794+ | Make this work like {@link MySQLDatabase::set()} |
Members
protected
- $cached_checks
—
array
Stores per-request cached constraint checks that come from the database.
Methods
protected
- alterTableAlterColumn()
- defaultConstraintName() — Return the name of the default constraint applied to $tableName.$colName.
- enumValuesFromCheckClause() — Get enum values from a constraint check clause.
- getIndexSqlDefinition() — Return SQL for dropping and recreating an index
- indexKey()
public
- IdColumn() — This returns the column which is the primary key for each table
- alterField() — Change the database type of the given field.
- alterIndex()
- alterTable() — Alter a table's schema.
- bigint() — Return a bigint type-formatted string
- boolean() — Return a boolean type-formatted string We use 'bit' so that we can do numeric-based comparisons
- buildMSSQLIndexName() — Builds the internal MS SQL Server index name given the silverstripe table and index name
- checkAndRepairTable() — Checks a table's integrity and repairs it if necessary.
- createDatabase()
- createField()
- createFullTextCatalog() — This will set up the full text search capabilities.
- createIndex() — Create an index on a table.
- createTable() — Create a new table.
- databaseExists()
- databaseList()
- date() — Return a date type-formatted string.
- datetime() — Return a datetime type-formatted string For MS SQL, we simply return the word 'timestamp', no other parameters are necessary
- dbDataType() — This is a lookup table for data types.
- decimal() — Return a decimal type-formatted string
- dropDatabase()
- enum() — Return a enum type-formatted string
- enumValuesForField() — Returns the values of the given enum field NOTE: Experimental; introduced for db-abstraction and may changed before 2.4 is released.
- fieldList()
- float() — Return a float type-formatted string.
- fullTextCatalogExists() — Check that a fulltext catalog has been created yet.
- fulltextIndexExists() — Check if a fulltext index exists on a particular table name.
- getConstraintCheckClause() — Given a table and column name, return a check constraint clause for that column in the table.
- getConstraintName() — Given the table and column name, retrieve the constraint name for that column in the table.
- getIdentityColumn() — Gets the identity column of a table
- getPrimaryKey() — MSSQL stores the primary key column with an internal identifier, so a lookup needs to be done to determine it.
- hasTable()
- indexList() — Return the list of indexes in a table.
- indexNames() — For a given table name, get all the internal index names, except for those that are primary keys and fulltext indexes.
- int() — Return a int type-formatted string
- renameField()
- renameTable()
- set()
- tableList()
- text() — Return a text type-formatted string
- time() — Return a time type-formatted string.
- varchar() — Return a varchar type-formatted string
- waitUntilIndexingFinished() — Sleep until the catalog has been fully rebuilt. This is a busy wait designed for situations when you need to be sure the index is up to date - for example in unit tests.
- year() — Return a 4 digit numeric type.