Class yii\sphinx\ColumnSchema

Inheritanceyii\sphinx\ColumnSchema » yii\base\BaseObject
Available since version2.0

ColumnSchema class describes the metadata of a column in a Sphinx index.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$dbType string The DB type of this column. yii\sphinx\ColumnSchema
$isAttribute boolean Whether this column is an attribute yii\sphinx\ColumnSchema
$isField boolean Whether this column is a indexed field yii\sphinx\ColumnSchema
$isMva boolean Whether this column is a multi value attribute (MVA) yii\sphinx\ColumnSchema
$isPrimaryKey boolean Whether this column is a primary key yii\sphinx\ColumnSchema
$name string Name of this column (without quotes). yii\sphinx\ColumnSchema
$phpType string The PHP type of this column. yii\sphinx\ColumnSchema
$type string Abstract type of this column. yii\sphinx\ColumnSchema

Public Methods

Hide inherited methods

MethodDescriptionDefined By
dbTypecast() Converts the input value according to $type and $dbType for use in a db query. yii\sphinx\ColumnSchema
phpTypecast() Converts the input value according to $phpType after retrieval from the database. yii\sphinx\ColumnSchema

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
typecast() Converts the input value according to $phpType after retrieval from the database. yii\sphinx\ColumnSchema

Property Details

$dbType public property

The DB type of this column. Possible DB types vary according to the type of DBMS.

public string $dbType null
$isAttribute public property

Whether this column is an attribute

public boolean $isAttribute null
$isField public property

Whether this column is a indexed field

public boolean $isField null
$isMva public property

Whether this column is a multi value attribute (MVA)

public boolean $isMva null
$isPrimaryKey public property

Whether this column is a primary key

public boolean $isPrimaryKey null
$name public property

Name of this column (without quotes).

public string $name null
$phpType public property

The PHP type of this column. Possible PHP types include: string, boolean, integer, double.

public string $phpType null
$type public property

Abstract type of this column. Possible abstract types include: string, text, boolean, smallint, integer, bigint, float, decimal, datetime, timestamp, time, date, binary, and money.

public string $type 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.

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

typecast() protected method (available since version 2.0.3)

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.

protected mixed typecast ( $value )
$value mixed

Input value

return mixed

Converted value