diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-05 14:38:30 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-05 14:38:30 +0200 |
commit | 17ceeae7ddd5c4eba2b1d0b25a17706b3d873346 (patch) | |
tree | 37d2607d6c589b47e3796708099dca338d804c12 /system/database/drivers/sqlite/sqlite_driver.php | |
parent | a3bca8f8c1e4cca5d763cbfe043999cbfd07cd21 (diff) |
Add replace() support for SQLite/SQLite3
Diffstat (limited to 'system/database/drivers/sqlite/sqlite_driver.php')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 627420295..12908effb 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -428,6 +428,23 @@ class CI_DB_sqlite_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 |