1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

optimizations

This commit is contained in:
David Grudl
2007-11-23 23:50:57 +00:00
parent 7c6947a019
commit c8fedf7692
5 changed files with 4 additions and 56 deletions

View File

@@ -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
*