Class:Table - Superclass: AbstractAsset AbstractAsset
⌊ Table
public class Table
extends AbstractAsset
www.doctrine-project.org
Field Summary | |
---|---|
final int | |
final int | |
final int | |
protected array | |
protected array | |
protected bool | |
protected array | |
protected string | |
protected array | |
protected string | |
protected SchemaConfig |
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
_name |
Constructor Summary | |
---|---|
Table(string tableName, array columns, array options, array indexes, array fkConstraints, int idGeneratorType) |
Method Summary | |
---|---|
Column | addColumn(string columnName, mixed typeName, array options, string columnType) |
Table | addForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) Add a foreign key constraintName is inferred from the local columns |
Table | addIndex(array columnNames, string indexName) |
Table | addNamedForeignKeyConstraint(string name, Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) Add a foreign key constraint with a given name |
Table | addOption(string name, string value) |
Table | addUniqueIndex(array columnNames, string indexName) |
Table | addUnnamedForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) Add a foreign key constraintName is to be generated by the database itsself. |
Table | changeColumn(string columnName, array options) Change Column Details |
bool | columnsAreIndexed(array columnsNames) Check if an index begins in the order of the given columns. |
Table | dropColumn(string columnName) Drop Column from Table |
Column | getColumn(string columnName) Get a column instance |
Column[] | |
ForeignKeyConstraint | getForeignKey(string constraintName) |
array | Get Constraints |
Index | getIndex(string indexName) |
array | |
void | getOption(mixed name) |
void | |
Index | |
bool | hasColumn(string columnName) Does this table have a column with the given name? |
bool | hasForeignKey(string constraintName) Does Table have a foreign key constraint with the given name? |
bool | hasIndex(string indexName) |
void | hasOption(mixed name) |
bool | |
array | |
Table | renameColumn(string oldColumnName, string newColumnName) Rename Column |
Table | setIdGeneratorType(string type) |
Table | setPrimaryKey(array columns, string indexName) Set Primary Key |
void | setSchemaConfig(SchemaConfig schemaConfig) |
void |
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
getName |
public final int ID_IDENTITY = 2
public final int $ID_NONE
public final int ID_SEQUENCE = 1
protected array $_columns = array()
protected array $_fkConstraints = array()
protected bool $_idGeneratorType = self::ID_NONE
protected array $_indexes = array()
protected string $_name = null
protected array $_options = array()
protected string $_primaryKeyName = false
protected SchemaConfig $_schemaConfig = null
public Table(string tableName, array columns, array options, array indexes, array fkConstraints, int idGeneratorType)
public Column addColumn(string columnName, mixed typeName, array options, string columnType)
public Table addForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)
Add a foreign key constraint
Name is inferred from the local columns
public Table addIndex(array columnNames, string indexName)
public Table addNamedForeignKeyConstraint(string name, Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)
Add a foreign key constraint with a given name
public Table addOption(string name, string value)
public Table addUniqueIndex(array columnNames, string indexName)
public Table addUnnamedForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)
Add a foreign key constraint
Name is to be generated by the database itsself.
public Table changeColumn(string columnName, array options)
Change Column Details
public bool columnsAreIndexed(array columnsNames)
Check if an index begins in the order of the given columns.
public Table dropColumn(string columnName)
Drop Column from Table
public Column getColumn(string columnName)
Get a column instance
public Column[] getColumns()
public ForeignKeyConstraint getForeignKey(string constraintName)
public array getForeignKeys()
Get Constraints
public Index getIndex(string indexName)
public array getIndexes()
public void getOption(mixed name)
public void getOptions()
public Index getPrimaryKey()
public bool hasColumn(string columnName)
Does this table have a column with the given name?
public bool hasForeignKey(string constraintName)
Does Table have a foreign key constraint with the given name?
public bool hasIndex(string indexName)
public void hasOption(mixed name)
public bool isIdGeneratorIdentity()
public array isIdGeneratorSequence()
public Table renameColumn(string oldColumnName, string newColumnName)
Rename Column
public Table setIdGeneratorType(string type)
public Table setPrimaryKey(array columns, string indexName)
Set Primary Key
public void setSchemaConfig(SchemaConfig schemaConfig)
public void visit(Visitor visitor)
Object Representation of a table