summaryrefslogtreecommitdiffstatshomepage
path: root/includes/database/sqlite/query.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-20 20:02:31 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-20 20:02:31 +0000
commitf09028107ca18a8f897ff517d2ed04688e1c567d (patch)
tree1f6cff867077daac6dbdd9a78967679cadef1b8c /includes/database/sqlite/query.inc
parent10931908b5885741be806ff15586770691801e51 (diff)
downloaddrupal-f09028107ca18a8f897ff517d2ed04688e1c567d.tar.gz
drupal-f09028107ca18a8f897ff517d2ed04688e1c567d.zip
- Patch #413732 by brianV: database code clean-up.
Diffstat (limited to 'includes/database/sqlite/query.inc')
-rw-r--r--includes/database/sqlite/query.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/database/sqlite/query.inc b/includes/database/sqlite/query.inc
index aff32802fc5..ab6e2da500d 100644
--- a/includes/database/sqlite/query.inc
+++ b/includes/database/sqlite/query.inc
@@ -1,5 +1,10 @@
<?php
-// $Id $
+// $Id$
+
+/**
+ * @file
+ * Query code for SQLite embedded database engine.
+ */
/**
* @ingroup database
@@ -27,14 +32,14 @@ class InsertQuery_sqlite extends InsertQuery {
return parent::execute();
}
else {
- return $this->connection->query('INSERT INTO {'. $this->table .'} DEFAULT VALUES', array(), $this->queryOptions);
+ return $this->connection->query('INSERT INTO {' . $this->table . '} DEFAULT VALUES', array(), $this->queryOptions);
}
}
public function __toString() {
// Produce as many generic placeholders as necessary.
$placeholders = array_fill(0, count($this->insertFields), '?');
- return 'INSERT INTO {'. $this->table .'} ('. implode(', ', $this->insertFields) .') VALUES ('. implode(', ', $placeholders) .')';
+ return 'INSERT INTO {' . $this->table . '} (' . implode(', ', $this->insertFields) . ') VALUES (' . implode(', ', $placeholders) . ')';
}
}
@@ -87,7 +92,7 @@ class UpdateQuery_sqlite extends UpdateQuery {
// The IS NULL operator is badly managed by DatabaseCondition.
$condition->where($field . ' IS NULL');
}
- else if (is_null($data)) {
+ elseif (is_null($data)) {
// The field will be set to NULL.
// The IS NULL operator is badly managed by DatabaseCondition.
$condition->where($field . ' IS NOT NULL');