Class yii\db\pgsql\ColumnSchema

继承yii\db\pgsql\ColumnSchema » yii\db\ColumnSchema » yii\base\BaseObject
实现yii\base\Configurable
源代码 https://github.com/yiisoft/yii2/blob/master/framework/db/pgsql/ColumnSchema.php

Class ColumnSchema for PostgreSQL database.

公共属性

隐藏继承的属性

属性类型描述定义在
$allowNull boolean 该列是否可以为null. yii\db\ColumnSchema
$autoIncrement boolean 该列是否是自动增量的. yii\db\ColumnSchema
$comment string 该列的注释. yii\db\ColumnSchema
$dbType string 该列的数据库(DB)类型. yii\db\ColumnSchema
$defaultValue mixed Default 该列的默认值. 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 可枚举值. yii\db\ColumnSchema
$isPrimaryKey boolean 该列是否是主键. yii\db\ColumnSchema
$name string 该列的名称(不含引号). yii\db\ColumnSchema
$phpType string 该列的 PHP 类型. yii\db\ColumnSchema
$precision integer 列数据的精度(如果为数字). yii\db\ColumnSchema
$scale integer 列数据的小数位数(如果为数字). yii\db\ColumnSchema
$sequenceName string Name of associated sequence if column is auto-incremental yii\db\pgsql\ColumnSchema
$size integer 显示列的大小. yii\db\ColumnSchema
$type string 该列的抽象类型. yii\db\ColumnSchema
$unsigned boolean 该列是否未签名. yii\db\ColumnSchema

公共方法

隐藏继承的方法

方法描述定义在
__call() 调用不是类方法的已命名方法. yii\base\BaseObject
__construct() 构造函数. yii\base\BaseObject
__get() 返回对象属性的值. yii\base\BaseObject
__isset() 检查属性是否已设置, 即已定义且不为null. yii\base\BaseObject
__set() 设置对象属性的值. yii\base\BaseObject
__unset() 将对象属性设置为null. yii\base\BaseObject
canGetProperty() 返回一个值, 指示属性是否可读. yii\base\BaseObject
canSetProperty() 返回一个值, 指示属性是否可写. yii\base\BaseObject
className() 返回此类的完全限定名称. yii\base\BaseObject
dbTypecast() 根据 $type$dbType 转换输入值, 以用于数据库(db)查询. yii\db\pgsql\ColumnSchema
hasMethod() 返回一个值, 指示方法是否已定义. yii\base\BaseObject
hasProperty() 返回一个值, 指示属性是否已定义. yii\base\BaseObject
init() 初始化对象. yii\base\BaseObject
phpTypecast() 从数据库中检索后, 根据 $phpType 转换输入值. yii\db\pgsql\ColumnSchema

受保护的方法

隐藏继承的方法

方法描述定义在
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() 从数据库中检索后, 根据 $phpType 转换输入值. yii\db\ColumnSchema

属性详情

$deserializeArrayColumnToArrayExpression public 属性 (可用自版本: 2.0.14.1)
弃用 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 属性

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

public integer $dimension 0
$disableArraySupport public 属性 (可用自版本: 2.0.14.1)
弃用 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 属性 (可用自版本: 2.0.14.1)
弃用 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 属性 (可用自版本: 2.0.29)

Name of associated sequence if column is auto-incremental

public string $sequenceName null

方法详情

dbTypecast() public 方法

根据 $type$dbType 转换输入值, 以用于数据库(db)查询.

如果该值为null表达式, 则不会进行转换.

public mixed dbTypecast ( $value )
$value mixed

输入的值.

return mixed

转换后的值. 这也可以是包含值作为第一个元素和 PDO 类型作为第二个元素的数组.

getArrayParser() protected 方法

Creates instance of ArrayParser

protected yii\db\pgsql\ArrayParser getArrayParser ( )
phpTypecast() public 方法

从数据库中检索后, 根据 $phpType 转换输入值.

如果该值为null表达式, 则不会进行转换.

public mixed phpTypecast ( $value )
$value mixed

输入的值.

return mixed

转换后的值.

phpTypecastValue() protected 方法

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

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