mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
add return type, remove unecessary reset
This commit is contained in:
parent
52e29831bc
commit
c77d1c2080
@ -56,14 +56,13 @@ class SQLite3Query extends Query
|
||||
/**
|
||||
* @todo This looks terrible but there is no SQLite3::get_num_rows() implementation
|
||||
*/
|
||||
private function countRecords()
|
||||
private function countRecords(): int
|
||||
{
|
||||
// Some queries are not iterable using fetchArray like CREATE statement
|
||||
if (!$this->handle->numColumns()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->handle->reset();
|
||||
$c = 0;
|
||||
while ($this->handle->fetchArray()) {
|
||||
$c++;
|
||||
|
Loading…
Reference in New Issue
Block a user