2019-01-12 17:43:06 +00:00
|
|
|
<?php
|
|
|
|
/** @license MIT
|
|
|
|
* Copyright 2017 J. King, Dustin Wilson et al.
|
|
|
|
* See LICENSE and AUTHORS files for details */
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2019-08-25 17:19:11 +00:00
|
|
|
namespace JKingWeb\Arsse\Test\DatabaseDrivers;
|
2019-01-12 17:43:06 +00:00
|
|
|
|
|
|
|
use JKingWeb\Arsse\Arsse;
|
|
|
|
|
|
|
|
trait SQLite3 {
|
2022-01-11 22:54:02 +00:00
|
|
|
use SQLite3Common;
|
|
|
|
|
2019-01-12 17:43:06 +00:00
|
|
|
protected static $implementation = "SQLite 3";
|
|
|
|
protected static $backend = "SQLite 3";
|
|
|
|
protected static $dbResultClass = \JKingWeb\Arsse\Db\SQLite3\Result::class;
|
|
|
|
protected static $dbStatementClass = \JKingWeb\Arsse\Db\SQLite3\Statement::class;
|
|
|
|
protected static $dbDriverClass = \JKingWeb\Arsse\Db\SQLite3\Driver::class;
|
|
|
|
protected static $stringOutput = false;
|
2020-03-01 20:16:50 +00:00
|
|
|
|
2019-01-12 17:43:06 +00:00
|
|
|
protected static function dbInterface() {
|
|
|
|
try {
|
|
|
|
$d = new \SQLite3(Arsse::$conf->dbSQLite3File);
|
|
|
|
} catch (\Throwable $e) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$d->enableExceptions(true);
|
|
|
|
return $d;
|
|
|
|
}
|
|
|
|
}
|