mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
fixed some bugs
This commit is contained in:
@@ -224,7 +224,7 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
public function rowCount()
|
||||
{
|
||||
if (!$this->buffered) {
|
||||
throw new BadMethodCallException(__METHOD__ . ' is not allowed for unbuffered queries');
|
||||
throw new DibiDatabaseException('Row count is not available for unbuffered queries');
|
||||
}
|
||||
return sqlite_num_rows($this->resultset);
|
||||
}
|
||||
@@ -254,11 +254,11 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
public function seek($row)
|
||||
{
|
||||
if (!$this->buffered) {
|
||||
throw new BadMethodCallException(__METHOD__ . ' is not allowed for unbuffered queries');
|
||||
throw new DibiDatabaseException('Cannot seek an unbuffered result set');
|
||||
}
|
||||
if (!sqlite_seek($this->resultset, $row)) {
|
||||
throw new DibiDatabaseException('Unable to seek to row ' . $row);
|
||||
}
|
||||
DibiDatabaseException::catchError();
|
||||
sqlite_seek($this->resultset, $row);
|
||||
DibiDatabaseException::restore();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user