PHP 8.1.33
Preview: CDbTableSchema.php Size: 2.13 KB
/home/jambtst2015/www/framework/db/schema/CDbTableSchema.php

<?php
/**
 * CDbTableSchema class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright 2008-2013 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

/**
 * 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:
 * <ul>
 * <li>{@link name}</li>
 * <li>{@link rawName}</li>
 * <li>{@link columns}</li>
 * <li>{@link primaryKey}</li>
 * <li>{@link foreignKeys}</li>
 * <li>{@link sequenceName}</li>
 * </ul>
 *
 * @property array $columnNames List of column names.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @package system.db.schema
 * @since 1.0
 */
class CDbTableSchema extends CComponent
{
	/**
	 * @var string name of this table.
	 */
	public $name;
	/**
	 * @var string 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 $rawName;
	/**
	 * @var string|array primary key name of this table. If composite key, an array of key names is returned.
	 */
	public $primaryKey;
	/**
	 * @var string sequence name for the primary key. Null if no sequence.
	 */
	public $sequenceName;
	/**
	 * @var 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.
	 */
	public $foreignKeys=array();
	/**
	 * @var array column metadata of this table. Each array element is a CDbColumnSchema object, indexed by column names.
	 */
	public $columns=array();

	/**
	 * Gets the named column metadata.
	 * This is a convenient method for retrieving a named column even if it does not exist.
	 * @param string $name column name
	 * @return CDbColumnSchema metadata of the named column. Null if the named column does not exist.
	 */
	public function getColumn($name)
	{
		return isset($this->columns[$name]) ? $this->columns[$name] : null;
	}

	/**
	 * @return array list of column names
	 */
	public function getColumnNames()
	{
		return array_keys($this->columns);
	}
}

Directory Contents

Dirs: 5 × Files: 7

Name Size Perms Modified Actions
mssql DIR
- drwxr-xr-x 2025-10-12 12:57:29
Edit Download
mysql DIR
- drwxr-xr-x 2025-10-14 03:19:55
Edit Download
oci DIR
- drwxr-xr-x 2025-10-09 05:04:28
Edit Download
pgsql DIR
- drwxr-xr-x 2025-10-11 09:51:13
Edit Download
sqlite DIR
- drwxr-xr-x 2025-10-08 18:50:54
Edit Download
3.88 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
29.61 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
22.58 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
1.72 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
22.55 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
2.13 KB lrw-r--r-- 2024-11-22 17:53:15
Edit Download
36.58 KB lrw-r--r-- 2025-11-04 10:48:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).