Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CDbColumnSchema
  • CDbCommandBuilder
  • CDbCriteria
  • CDbExpression
  • CDbSchema
  • CDbTableSchema
  • X2DbCriteria
  • Overview
  • Package
  • Class
  • Tree

Class CDbColumnSchema

CDbColumnSchema class describes the column meta data of a database table.

CComponent
Extended by CDbColumnSchema

Direct known subclasses

CCubridColumnSchema, CMssqlColumnSchema, CMysqlColumnSchema, COciColumnSchema, CPgsqlColumnSchema, CSqliteColumnSchema
Package: system\db\schema
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/db/schema/CDbColumnSchema.php
Methods summary
public
# init( string $dbType, mixed $defaultValue )

Initializes the column with its DB type and default value. This sets up the column's PHP type, size, precision, scale as well as default value.

Initializes the column with its DB type and default value. This sets up the column's PHP type, size, precision, scale as well as default value.

Parameters

$dbType
string
$dbType the column's DB type
$defaultValue
mixed
$defaultValue the default value
protected
# extractType( string $dbType )

Extracts the PHP type from DB type.

Extracts the PHP type from DB type.

Parameters

$dbType
string
$dbType DB type
protected
# extractLimit( string $dbType )

Extracts size, precision and scale information from column's DB type.

Extracts size, precision and scale information from column's DB type.

Parameters

$dbType
string
$dbType the column's DB type
protected
# extractDefault( mixed $defaultValue )

Extracts the default value for the column. The value is typecasted to correct PHP type.

Extracts the default value for the column. The value is typecasted to correct PHP type.

Parameters

$defaultValue
mixed
$defaultValue the default value obtained from metadata
public mixed
# typecast( mixed $value )

Converts the input value to the type that this column is of.

Converts the input value to the type that this column is of.

Parameters

$value
mixed
$value input value

Returns

mixed
converted value
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public string $name
#

name of this column (without quotes).

name of this column (without quotes).

public string $rawName
#

raw name of this column. This is the quoted name that can be used in SQL queries.

raw name of this column. This is the quoted name that can be used in SQL queries.

public boolean $allowNull
#

whether this column can be null.

whether this column can be null.

public string $dbType
#

the DB type of this column.

the DB type of this column.

public string $type
#

the PHP type of this column.

the PHP type of this column.

public mixed $defaultValue
#

default value of this column

default value of this column

public integer $size
#

size of the column.

size of the column.

public integer $precision
#

precision of the column data, if it is numeric.

precision of the column data, if it is numeric.

public integer $scale
#

scale of the column data, if it is numeric.

scale of the column data, if it is numeric.

public boolean $isPrimaryKey
#

whether this column is a primary key

whether this column is a primary key

public boolean $isForeignKey
#

whether this column is a foreign key

whether this column is a foreign key

public boolean $autoIncrement false
#

whether this column is auto-incremental

whether this column is auto-incremental

Since

1.1.7
public string $comment ''
#

comment of this column. Default value is empty string which means that no comment has been set for the column. Null value means that RDBMS does not support column comments at all (SQLite) or comment retrieval for the active RDBMS is not yet supported by the framework.

comment of this column. Default value is empty string which means that no comment has been set for the column. Null value means that RDBMS does not support column comments at all (SQLite) or comment retrieval for the active RDBMS is not yet supported by the framework.

Since

1.1.13
API documentation generated by ApiGen 2.8.0