summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite3/sqlite3_driver.php
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-04-05 16:47:59 +0200
committerTaufan Aditya <toopay@taufanaditya.com>2012-04-05 16:47:59 +0200
commit57414b7ee33c8e3c6ee9fd2f63353bf9fa353651 (patch)
tree92276c49037a3dc9e046278c6c971a05d92d9a87 /system/database/drivers/sqlite3/sqlite3_driver.php
parent0793b1c918a0146920b1a03323f055521c4a9c66 (diff)
parent6d83cde3ba326f400b11475c51a4becec51c2de8 (diff)
Merge remote-tracking branch 'upstream/develop' into db-tests
Diffstat (limited to 'system/database/drivers/sqlite3/sqlite3_driver.php')
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php43
1 files changed, 31 insertions, 12 deletions
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php
index 7d6de80bf..c78f0c4fe 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -16,12 +16,12 @@
* through the world wide web, please send an email to
* licensing@ellislab.com so we can send you a copy immediately.
*
- * @package CodeIgniter
- * @author EllisLab Dev Team
+ * @package CodeIgniter
+ * @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
- * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
- * @link http://codeigniter.com
- * @since Version 1.0
+ * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * @link http://codeigniter.com
+ * @since Version 1.0
* @filesource
*/
@@ -32,11 +32,12 @@
* creates dynamically based on whether the active record
* class is being used or not.
*
- * @package CodeIgniter
+ * @package CodeIgniter
* @subpackage Drivers
* @category Database
- * @author Andrey Andreev
- * @link http://codeigniter.com/user_guide/database/
+ * @author Andrey Andreev
+ * @link http://codeigniter.com/user_guide/database/
+ * @since Version 3.0
*/
class CI_DB_sqlite3_driver extends CI_DB {
@@ -399,18 +400,36 @@ class CI_DB_sqlite3_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * Replace statement
+ *
+ * Generates a platform-specific replace string from the supplied data
+ *
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ protected function _replace($table, $keys, $values)
+ {
+ return 'INSERT OR '.parent::_replace($table, $keys, $values);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Truncate statement
*
* Generates a platform-specific truncate string from the supplied data
- * If the database does not support the truncate() command, then
- * this method maps to "DELETE FROM table"
+ *
+ * If the database does not support the truncate() command, then,
+ * then this method maps to 'DELETE FROM table'
*
* @param string the table name
* @return string
*/
protected function _truncate($table)
{
- return $this->_delete($table);
+ return 'DELETE FROM '.$table;
}
// --------------------------------------------------------------------