summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Sqlite
diff options
context:
space:
mode:
authorwei <>2007-04-14 05:02:29 +0000
committerwei <>2007-04-14 05:02:29 +0000
commit0f0d3c62e608287cdf77f1a3239371b521ecb40b (patch)
treebd91a9499a946e1667a0e17a9c5a97a9d695c7ce /framework/Data/Common/Sqlite
parentb05442bbe751b87998d8500ad8e6b28d652a35db (diff)
Refactor ActiveRecordGateway to use TDataGatewayCommand
Diffstat (limited to 'framework/Data/Common/Sqlite')
-rw-r--r--framework/Data/Common/Sqlite/TSqliteMetaData.php22
-rw-r--r--framework/Data/Common/Sqlite/TSqliteTableColumn.php2
2 files changed, 22 insertions, 2 deletions
diff --git a/framework/Data/Common/Sqlite/TSqliteMetaData.php b/framework/Data/Common/Sqlite/TSqliteMetaData.php
index 68734046..2ce46fb7 100644
--- a/framework/Data/Common/Sqlite/TSqliteMetaData.php
+++ b/framework/Data/Common/Sqlite/TSqliteMetaData.php
@@ -80,6 +80,7 @@ class TSqliteMetaData extends TDbMetaData
$columnId = $col['name']; //use column name as column Id
$info['ColumnName'] = '"'.$columnId.'"'; //quote the column names!
+ $info['ColumnId'] = $columnId;
$info['ColumnIndex'] = $col['index'];
if($col['notnull']!=='99')
@@ -115,6 +116,8 @@ class TSqliteMetaData extends TDbMetaData
}
/**
+ *
+ *
* @param string quoted table name.
* @return array foreign key details.
*/
@@ -145,6 +148,23 @@ class TSqliteMetaData extends TDbMetaData
}
return false;
}
+}
-}
+/**
+
+CREATE TABLE foo
+(
+ id INTEGER NOT NULL PRIMARY KEY,
+ id2 CHAR(2)
+);
+
+CREATE TABLE bar
+(
+ id INTEGER NOT NULL PRIMARY KEY,
+ foo_id INTEGER NOT NULL CONSTRAINT fk_foo_id REFERENCES foo(id) ON DELETE CASCADE,
+ foo_id2 CHAR(2) CONSTRAINT fk_foo_id REFERENCES foo(id2) ON DELETE CASCADE,
+ bar_id INTEGER NOT NULL CONSTRAINT fk_bar_id REFERENCES bar(id)
+);
+*/
+
?> \ No newline at end of file
diff --git a/framework/Data/Common/Sqlite/TSqliteTableColumn.php b/framework/Data/Common/Sqlite/TSqliteTableColumn.php
index cb379bfd..b8287218 100644
--- a/framework/Data/Common/Sqlite/TSqliteTableColumn.php
+++ b/framework/Data/Common/Sqlite/TSqliteTableColumn.php
@@ -53,7 +53,7 @@ class TSqliteTableColumn extends TDbTableColumn
/**
* @return boolean true if auto increment is true.
*/
- public function getHasSequence()
+ public function hasSequence()
{
return $this->getAutoIncrement();
}