summaryrefslogtreecommitdiff
path: root/framework/Data/Common/TDbTableInfo.php
diff options
context:
space:
mode:
authorwei <>2007-04-12 12:43:49 +0000
committerwei <>2007-04-12 12:43:49 +0000
commit32b73a0b1dfcd33e07e7fd2b2cf2fd7d42cf48a0 (patch)
treebf2b348fa854d82dcf8a9f43ffd43df3eba5a1e8 /framework/Data/Common/TDbTableInfo.php
parent815ce4bcc616c4b0618046651174062efc93fd06 (diff)
Add Sqlite driver.
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()