diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
commit | e18feedfdb429e35173b85fc7182aadabee0a166 (patch) | |
tree | 20c8e64d4db97378fad2bc27689b9b88e9390f1f /includes/database/sqlite | |
parent | 6a1217aff08d3380658ef47e0e9d9d693683c66a (diff) | |
download | brdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.gz brdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.bz2 |
#564394 by Berdir and Crell: Removed database BC layer. nah nah nah nah... hey hey hey... gooood byeeee...
Diffstat (limited to 'includes/database/sqlite')
-rw-r--r-- | includes/database/sqlite/database.inc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index e4b8de67d..d210422b4 100644 --- a/includes/database/sqlite/database.inc +++ b/includes/database/sqlite/database.inc @@ -135,11 +135,11 @@ class DatabaseConnection_sqlite extends DatabaseConnection { return parent::prepare($query, $options); } - public function queryRange($query, array $args, $from, $count, array $options = array()) { + public function queryRange($query, $from, $count, array $args = array(), array $options = array()) { return $this->query($query . ' LIMIT ' . $from . ', ' . $count, $args, $options); } - public function queryTemporary($query, array $args, array $options = array()) { + public function queryTemporary($query, array $args = array(), array $options = array()) { $tablename = $this->generateTemporaryTableName(); $this->query(preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE {' . $tablename . '} AS SELECT', $query), $args, $options); return $tablename; @@ -164,15 +164,6 @@ class DatabaseConnection_sqlite extends DatabaseConnection { // DatabaseStatement_sqlite::execute() and cannot be cached. return $this->prepare($this->prefixTables($query)); } - - /** - * @todo Remove this as soon as db_rewrite_sql() has been exterminated. - */ - public function distinctField($table, $field, $query) { - $field_to_select = 'DISTINCT(' . $table . '.' . $field . ')'; - // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT). - return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $field . '(.*FROM )/AUsi', '\1 ' . $field_to_select . '\2', $query); - } } /** |