- Patch #851590 by Damien Tournoud: SQLite should 'stringify' fetches.
parent
9d15ef4f04
commit
02a4755049
|
@ -47,6 +47,8 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
|
|||
parent::__construct('sqlite:' . $connection_options['database'], '', '', array(
|
||||
// Force column names to lower case.
|
||||
PDO::ATTR_CASE => PDO::CASE_LOWER,
|
||||
// Convert numeric values to strings when fetching.
|
||||
PDO::ATTR_STRINGIFY_FETCHES => TRUE,
|
||||
));
|
||||
|
||||
$this->exec('PRAGMA encoding="UTF-8"');
|
||||
|
@ -207,7 +209,7 @@ class DatabaseConnection_sqlite extends DatabaseConnection {
|
|||
}
|
||||
// The transaction gets committed when the transaction object gets destroyed
|
||||
// because it gets out of scope.
|
||||
return (int) $this->query('SELECT value FROM {sequences}')->fetchField();
|
||||
return $this->query('SELECT value FROM {sequences}')->fetchField();
|
||||
}
|
||||
|
||||
public function rollback($savepoint_name = 'drupal_transaction') {
|
||||
|
|
Loading…
Reference in New Issue