Page MenuHomeDevCentral

No OneTemporary

diff --git a/src/Engines/BlackholeEngine.php b/src/Engines/BlackholeEngine.php
index 55670dc..dd12227 100644
--- a/src/Engines/BlackholeEngine.php
+++ b/src/Engines/BlackholeEngine.php
@@ -1,62 +1,62 @@
<?php
namespace Keruald\Database\Engines;
use Keruald\Database\DatabaseEngine;
use Keruald\Database\Result\DatabaseResult;
class BlackholeEngine extends DatabaseEngine {
public function escape (string $expression) : string {
return $expression;
}
public function query (string $query) : bool|DatabaseResult {
return true;
}
public function nextId () : int|string {
return 0;
}
public function countAffectedRows () : int {
return 0;
}
protected function getExceptionContext () : array {
return [];
}
public static function load (array $config): DatabaseEngine {
return new self;
}
- public function getUnderlyingDriver () : mixed {
+ public function getUnderlyingDriver () : null {
return null;
}
public function isExistingTable (string $database, string $table) : bool {
// Everything and nothing exists in a black hole
return true;
}
///
/// Error handling
///
public function error () : array {
return [];
}
///
/// Events
///
protected function onCantConnectToHost () : void {
// We can always connect to a black hole engine.
}
protected function onQueryError (string $query) : void {
// Queries are always valid.
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Nov 21, 16:29 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3188576
Default Alt Text
(1 KB)

Event Timeline