summaryrefslogtreecommitdiff
path: root/framework/Data/Common
diff options
context:
space:
mode:
authorwei <>2007-05-04 08:37:12 +0000
committerwei <>2007-05-04 08:37:12 +0000
commit8708f7e88e423b44ea4b3b8fff14f055d2b5c4ac (patch)
treef468f8990c7675089f804914453ba994d0c1be30 /framework/Data/Common
parentc1bddf3826ec570ea4c58d7a56c410ae54d26508 (diff)
Add saving/updating ActiveRecord relationships.
Diffstat (limited to 'framework/Data/Common')
-rw-r--r--framework/Data/Common/Sqlite/TSqliteMetaData.php3
-rw-r--r--framework/Data/Common/Sqlite/TSqliteTableInfo.php8
2 files changed, 10 insertions, 1 deletions
diff --git a/framework/Data/Common/Sqlite/TSqliteMetaData.php b/framework/Data/Common/Sqlite/TSqliteMetaData.php
index 6c6ff232..1a72622e 100644
--- a/framework/Data/Common/Sqlite/TSqliteMetaData.php
+++ b/framework/Data/Common/Sqlite/TSqliteMetaData.php
@@ -33,6 +33,7 @@ class TSqliteMetaData extends TDbMetaData
*/
protected function createTableInfo($tableName)
{
+ $tableName = str_replace("'",'',$tableName);
$this->getDbConnection()->setActive(true);
$table = $this->getDbConnection()->quoteString($tableName);
$sql = "PRAGMA table_info({$table})";
@@ -49,7 +50,7 @@ class TSqliteMetaData extends TDbMetaData
if($column->getIsPrimaryKey())
$primary[] = $col['name'];
}
- $info['TableName'] = $table;
+ $info['TableName'] = $tableName;
if($this->getIsView($tableName))
$info['IsView'] = true;
if(count($columns)===0)
diff --git a/framework/Data/Common/Sqlite/TSqliteTableInfo.php b/framework/Data/Common/Sqlite/TSqliteTableInfo.php
index e0bcb484..52c872d6 100644
--- a/framework/Data/Common/Sqlite/TSqliteTableInfo.php
+++ b/framework/Data/Common/Sqlite/TSqliteTableInfo.php
@@ -35,6 +35,14 @@ class TSqliteTableInfo extends TDbTableInfo
Prado::using('System.Data.Common.Sqlite.TSqliteCommandBuilder');
return new TSqliteCommandBuilder($connection,$this);
}
+
+ /**
+ * @return string full name of the table, database dependent.
+ */
+ public function getTableFullName()
+ {
+ return "'".$this->getTableName()."'";
+ }
}
?> \ No newline at end of file