summaryrefslogtreecommitdiff
path: root/framework/Data/Common/TDbTableInfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/Common/TDbTableInfo.php')
-rw-r--r--framework/Data/Common/TDbTableInfo.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/framework/Data/Common/TDbTableInfo.php b/framework/Data/Common/TDbTableInfo.php
index 9b7f4392..9689630f 100644
--- a/framework/Data/Common/TDbTableInfo.php
+++ b/framework/Data/Common/TDbTableInfo.php
@@ -24,7 +24,6 @@ class TDbTableInfo extends TComponent
private $_primaryKeys;
private $_foreignKeys;
- private $_uniqueKeys;
private $_columns;
@@ -34,12 +33,11 @@ class TDbTableInfo extends TComponent
* Sets the database table meta data information.
* @param array table column information.
*/
- public function __construct($tableInfo,$primary=array(),$foreign=array(), $unique=array())
+ public function __construct($tableInfo,$primary=array(),$foreign=array())
{
$this->_info=$tableInfo;
$this->_primaryKeys=$primary;
$this->_foreignKeys=$foreign;
- $this->_uniqueKeys=$unique;
$this->_columns=new TMap;
}
@@ -110,7 +108,9 @@ class TDbTableInfo extends TComponent
*/
public function getColumn($name)
{
- return $this->_columns->itemAt($name);
+ if(($column = $this->_columns->itemAt($name))!==null)
+ return $column;
+ throw new TDbException('dbtableinfo_invalid_column_name', $name, $this->getTableFullName());
}
/**
@@ -142,14 +142,6 @@ class TDbTableInfo extends TComponent
}
/**
- * @return array unique column ids.
- */
- public function getUniqueKeys()
- {
- return $this->_uniqueKeys;
- }
-
- /**
* @return array lowercased column key names mapped to normal column ids.
*/
public function getLowerCaseColumnNames()