-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the "dibi" - smart database abstraction layer. | ||
* Copyright (c) 2005 David Grudl (https://davidgrudl.com) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Dibi\Drivers; | ||
|
||
use Dibi; | ||
|
||
|
||
/** | ||
* The dibi driver for empty result set. | ||
*/ | ||
class EmptyResult implements Dibi\ResultDriver | ||
{ | ||
use Dibi\Strict; | ||
|
||
/** @var int */ | ||
private $rows; | ||
|
||
|
||
public function __construct(int $rows) | ||
{ | ||
$this->rows = $rows; | ||
} | ||
|
||
|
||
/** | ||
* Returns the number of affected rows. | ||
*/ | ||
public function getRowCount(): int | ||
{ | ||
return $this->rows; | ||
} | ||
|
||
|
||
public function fetch(bool $assoc): ?array | ||
{ | ||
return null; | ||
} | ||
|
||
|
||
public function seek(int $row): bool | ||
{ | ||
return false; | ||
} | ||
|
||
|
||
public function free(): void | ||
{ | ||
} | ||
|
||
|
||
public function getResultColumns(): array | ||
{ | ||
return []; | ||
} | ||
|
||
|
||
public function getResultResource() | ||
{ | ||
return null; | ||
} | ||
|
||
|
||
public function unescapeBinary(string $value): string | ||
{ | ||
return $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters