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 CDbTableSchema

CDbTableSchema is the base class for representing the metadata of a database table.

It may be extended by different DBMS driver to provide DBMS-specific table metadata.

CDbTableSchema provides the following information about a table:
  • CDbTableSchema::$name
  • CDbTableSchema::$rawName
  • CDbTableSchema::$columns
  • CDbTableSchema::$primaryKey
  • CDbTableSchema::$foreignKeys
  • CDbTableSchema::$sequenceName
CComponent
Extended by CDbTableSchema

Direct known subclasses

CCubridTableSchema, CMssqlTableSchema, CMysqlTableSchema, COciTableSchema, CPgsqlTableSchema
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/CDbTableSchema.php
Methods summary
public CDbColumnSchema
# getColumn( string $name )

Gets the named column metadata. This is a convenient method for retrieving a named column even if it does not exist.

Gets the named column metadata. This is a convenient method for retrieving a named column even if it does not exist.

Parameters

$name
string
$name column name

Returns

CDbColumnSchema
metadata of the named column. Null if the named column does not exist.
public array
# getColumnNames( )

Returns

array
list of column names
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 table.

name of this table.

public string $rawName
#

raw name of this table. This is the quoted version of table name with optional schema name. It can be directly used in SQLs.

raw name of this table. This is the quoted version of table name with optional schema name. It can be directly used in SQLs.

public string|array $primaryKey
#

primary key name of this table. If composite key, an array of key names is returned.

primary key name of this table. If composite key, an array of key names is returned.

public string $sequenceName
#

sequence name for the primary key. Null if no sequence.

sequence name for the primary key. Null if no sequence.

public array $foreignKeys array()
#

foreign keys of this table. The array is indexed by column name. Each value is an array of foreign table name and foreign column name.

foreign keys of this table. The array is indexed by column name. Each value is an array of foreign table name and foreign column name.

public array $columns array()
#

column metadata of this table. Each array element is a CDbColumnSchema object, indexed by column names.

column metadata of this table. Each array element is a CDbColumnSchema object, indexed by column names.

Magic properties summary
public array $columnNames
#

List of column names.

List of column names.

API documentation generated by ApiGen 2.8.0