summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/Common/Sqlite')
-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