Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13143307
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 21, 16:29 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3188576
Default Alt Text
(1 KB)
Attached To
Mode
rKDB Keruald Database
Attached
Detach File
Event Timeline
Log In to Comment