mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
optimizations
This commit is contained in:
@@ -120,16 +120,12 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
|
||||
DibiDriverException::catchError();
|
||||
if ($this->buffered) {
|
||||
$this->resultset = sqlite_query($this->connection, $sql, SQLITE_ASSOC);
|
||||
$this->resultset = sqlite_query($this->connection, $sql);
|
||||
} else {
|
||||
$this->resultset = sqlite_unbuffered_query($this->connection, $sql, SQLITE_ASSOC);
|
||||
$this->resultset = sqlite_unbuffered_query($this->connection, $sql);
|
||||
}
|
||||
DibiDriverException::restore();
|
||||
|
||||
if (sqlite_last_error($this->connection)) {
|
||||
$this->throwException();
|
||||
}
|
||||
|
||||
return is_resource($this->resultset);
|
||||
}
|
||||
|
||||
@@ -303,19 +299,6 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Converts database error to DibiDriverException
|
||||
*
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
protected function throwException($sql=NULL)
|
||||
{
|
||||
$errno = sqlite_last_error($this->connection);
|
||||
throw new DibiDriverException(sqlite_error_string($errno), $errno, $sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the connection resource
|
||||
*
|
||||
|
Reference in New Issue
Block a user