ColumnSchema ​
- Type
- Class
- Namespace
- craft\db\mysql
- Inherits
- craft\db\mysql\ColumnSchema » yii\db\mysql\ColumnSchema » yii\db\ColumnSchema » yii\base\BaseObject
- Implements
- yii\base\Configurable
Public Properties ​
Property | Description |
---|---|
allowNull | boolean – Whether this column can be null. |
autoIncrement | boolean – Whether this column is auto-incremental |
collation | string, null – Collation |
comment | string – Comment of this column. |
dbType | string – The DB type of this column. |
defaultValue | mixed – Default value of this column |
disableJsonSupport | boolean – Whether the column schema should OMIT using JSON support feature. |
enumValues | array – Enumerable values. |
isPrimaryKey | boolean – Whether this column is a primary key |
name | string – Name of this column (without quotes). |
phpType | string – The PHP type of this column. |
precision | integer – Precision of the column data, if it is numeric. |
scale | integer – Scale of the column data, if it is numeric. |
size | integer – Display size of the column. |
type | string – Abstract type of this column. |
unsigned | boolean – Whether this column is unsigned. |
collation
​
Collation
Public Methods ​
Method | Description |
---|---|
__call() | Calls the named method which is not a class method. |
__construct() | Constructor. |
__get() | Returns the value of an object property. |
__isset() | Checks if a property is set, i.e. defined and not null. |
__set() | Sets value of an object property. |
__unset() | Sets an object property to null. |
canGetProperty() | Returns a value indicating whether a property can be read. |
canSetProperty() | Returns a value indicating whether a property can be set. |
className() | Returns the fully qualified name of this class. |
dbTypecast() | Converts the input value according to type and dbType for use in a db query. |
hasMethod() | Returns a value indicating whether a method is defined. |
hasProperty() | Returns a value indicating whether a property is defined. |
init() | Initializes the object. |
phpTypecast() | Converts the input value according to phpType after retrieval from the database. |
Protected Methods ​
Method | Description |
---|---|
typecast() | Converts the input value according to phpType after retrieval from the database. |
typecast()
​
Converts the input value according to phpType after retrieval from the database.
If the value is null or an \Expression
, it will not be converted.
Arguments ​
$value
(mixed
) – Input value
Returns ​
mixed
– Converted value