mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 09:02:41 +00:00
18 lines
390 B
PHP
18 lines
390 B
PHP
|
<?php
|
||
|
declare(strict_types=1);
|
||
|
namespace JKingWeb\NewsSync\Db;
|
||
|
|
||
|
Trait CommonSQLite3 {
|
||
|
|
||
|
static public function driverName(): string {
|
||
|
return "SQLite 3";
|
||
|
}
|
||
|
|
||
|
public function schemaVersion(string $schema = "main"): int {
|
||
|
return $this->unsafeQuery("PRAGMA $schema.user_version")->getSingle();
|
||
|
}
|
||
|
|
||
|
public function exec(string $query): bool {
|
||
|
return (bool) $this->db->exec($query);
|
||
|
}
|
||
|
}
|