TableSchema
API reference › yii › db › mssql › TableSchema
TableSchema represents the metadata of a database table.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$catalogName | string| | Name of the catalog (database) that this table belongs to. Default: null. | TableSchema |
$columnNames read-only | array | List of column names. | yii\ |
$columns | yii\[] | Column metadata of this table. Default: []. | yii\ |
$foreignKeys | array | Foreign keys of this table. Default: []. | yii\ |
$fullName | string | The full name of this table, which includes the schema name prefix, if any. Default: null. | yii\ |
$name | string | The name of this table. Default: null. | yii\ |
$primaryKey | string[] | Primary keys of this table. Default: []. | yii\ |
$schemaName | string | The name of the schema that this table belongs to. Default: null. | yii\ |
$sequenceName | string| | Sequence name for the primary key. Default: null. | yii\ |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Constructor. | yii\ |
__call() | Calls the named method which is not a class method. | yii\ |
__get() | Returns the value of an object property. | yii\ |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\ |
__set() | Sets value of an object property. | yii\ |
__unset() | Sets an object property to null. | yii\ |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\ |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\ |
className() static | Returns the fully qualified name of this class. | yii\ |
fixPrimaryKey() | Manually specifies the primary key for this table. | yii\ |
getColumn() | Gets the named column metadata. | yii\ |
getColumnNames() | Returns the names of all columns in this table. | yii\ |
hasMethod() | Returns a value indicating whether a method is defined. | yii\ |
hasProperty() | Returns a value indicating whether a property is defined. | yii\ |
init() | Initializes the object. | yii\ |
Property details
Section titled “Property details”$catalogName
Section titled “$catalogName ”public string|null $catalogName = nullName of the catalog (database) that this table belongs to.
Defaults to null, meaning no catalog (or the current database).