Class yii\db\pgsql\ColumnSchema

Inheritanceyii\db\pgsql\ColumnSchema » yii\db\ColumnSchema » yii\base\BaseObject
Implementsyii\base\Configurable
Source Code https://github.com/yiisoft/yii2/blob/master/framework/db/pgsql/ColumnSchema.php

Class ColumnSchema for PostgreSQL database.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$allowNull boolean Whether this column can be null. yii\db\ColumnSchema
$autoIncrement boolean Whether this column is auto-incremental yii\db\ColumnSchema
$comment string Comment of this column. yii\db\ColumnSchema
$dbType string The DB type of this column. yii\db\ColumnSchema
$defaultValue mixed Default value of this column yii\db\ColumnSchema
$deserializeArrayColumnToArrayExpression boolean Whether the Array column value should be unserialized to an yii\db\ArrayExpression object. yii\db\pgsql\ColumnSchema
$dimension integer The dimension of array. yii\db\pgsql\ColumnSchema
$disableArraySupport boolean Whether the column schema should OMIT using PgSQL Arrays support feature. yii\db\pgsql\ColumnSchema
$disableJsonSupport boolean Whether the column schema should OMIT using JSON support feature. yii\db\pgsql\ColumnSchema
$enumValues array Enumerable values. yii\db\ColumnSchema
$isPrimaryKey boolean Whether this column is a primary key yii\db\ColumnSchema
$name string Name of this column (without quotes). yii\db\ColumnSchema
$phpType string The PHP type of this column. yii\db\ColumnSchema
$precision integer Precision of the column data, if it is numeric. yii\db\ColumnSchema
$scale integer Scale of the column data, if it is numeric. yii\db\ColumnSchema
$sequenceName string Name of associated sequence if column is auto-incremental yii\db\pgsql\ColumnSchema
$size integer Display size of the column. yii\db\ColumnSchema
$type string Abstract type of this column. yii\db\ColumnSchema
$unsigned boolean Whether this column is unsigned. yii\db\ColumnSchema

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__construct() Constructor. yii\base\BaseObject
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
dbTypecast() Converts the input value according to $type and $dbType for use in a db query. yii\db\pgsql\ColumnSchema
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Initializes the object. yii\base\BaseObject
phpTypecast() Converts the input value according to $phpType after retrieval from the database. yii\db\pgsql\ColumnSchema

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getArrayParser() Creates instance of ArrayParser yii\db\pgsql\ColumnSchema
phpTypecastValue() Casts $value after retrieving from the DBMS to PHP representation. yii\db\pgsql\ColumnSchema
typecast() Converts the input value according to $phpType after retrieval from the database. yii\db\ColumnSchema

Property Details

$deserializeArrayColumnToArrayExpression public property (available since version 2.0.14.1)
Deprecated Since 2.0.14.1 and will be removed in 2.1.

Whether the Array column value should be unserialized to an yii\db\ArrayExpression object. You can use this property to make upgrade to Yii 2.0.14 easier. Default to true, meaning arrays are unserialized to yii\db\ArrayExpression objects.

$dimension public property

The dimension of array. Defaults to 0, means this column is not an array.

public integer $dimension 0
$disableArraySupport public property (available since version 2.0.14.1)
Deprecated Since 2.0.14.1 and will be removed in 2.1.

Whether the column schema should OMIT using PgSQL Arrays support feature. You can use this property to make upgrade to Yii 2.0.14 easier. Default to false, meaning Arrays support is enabled.

$disableJsonSupport public property (available since version 2.0.14.1)
Deprecated Since 2.0.14.1 and will be removed in 2.1.

Whether the column schema should OMIT using JSON support feature. You can use this property to make upgrade to Yii 2.0.14 easier. Default to false, meaning JSON support is enabled.

$sequenceName public property (available since version 2.0.29)

Name of associated sequence if column is auto-incremental

public string $sequenceName null

Method Details

dbTypecast() public method

Converts the input value according to $type and $dbType for use in a db query.

If the value is null or an yii\db\Expression, it will not be converted.

public mixed dbTypecast ( $value )
$value mixed

Input value

return mixed

Converted value. This may also be an array containing the value as the first element and the PDO type as the second element.

getArrayParser() protected method

Creates instance of ArrayParser

protected yii\db\pgsql\ArrayParser getArrayParser ( )
phpTypecast() public method

Converts the input value according to $phpType after retrieval from the database.

If the value is null or an yii\db\Expression, it will not be converted.

public mixed phpTypecast ( $value )
$value mixed

Input value

return mixed

Converted value

phpTypecastValue() protected method

Casts $value after retrieving from the DBMS to PHP representation.

protected boolean|mixed|null phpTypecastValue ( $value )
$value string|null