Page MenuHomeDevCentral

BlackholeEngine.php
No OneTemporary

BlackholeEngine.php

<?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 {
return null;
}
public function isExistingTable (string $database, string $table) : bool {
// Everything and nothing exists in a blackhole
return true;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Feb 28, 22:47 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2439623
Default Alt Text
BlackholeEngine.php (932 B)

Event Timeline