modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-04-25 00:34:54 +04:00
parent 6a0838d4fa
commit 2d8a19e232
4 changed files with 10 additions and 10 deletions

View File

@ -72,8 +72,8 @@ class Sqlite {
function open(): self {
if ($this->db === null) {
$this->db = new SQLite3($this->file, $this->flags, $this->encryptionKey);
SqliteConfig::with($this->config)->configure($this);
SqliteMigration::with($this->migration)->migrate($this);
_Config::with($this->config)->configure($this);
_Migration::with($this->migration)->migrate($this);
}
return $this;
}
@ -100,7 +100,7 @@ class Sqlite {
function exec($sql, ?array $params=null): bool {
$this->open();
$query = new SqliteQuery($sql, $params);
$query = new _Query($sql, $params);
$db = $this->db;
if ($query->useStmt($db, $stmt, $sql)) {
try {
@ -120,7 +120,7 @@ class Sqlite {
function get($sql, ?array $params=null, bool $entireRow=false) {
$this->open();
$query = new SqliteQuery($sql, $params);
$query = new _Query($sql, $params);
$db = $this->db;
if ($query->useStmt($db, $stmt, $sql)) {
try {
@ -153,7 +153,7 @@ class Sqlite {
function all($sql, ?array $params=null): iterable {
$this->open();
$query = new SqliteQuery($sql, $params);
$query = new _Query($sql, $params);
$db = $this->db;
if ($query->useStmt($db, $stmt, $sql)) {
try {

View File

@ -3,8 +3,8 @@ namespace nur\sery\db\sqlite;
use nur\sery\php\func;
class SqliteConfig {
static function with($configs): SqliteConfig {
class _Config {
static function with($configs): _Config {
if ($configs instanceof self) return $configs;
return new static($configs);
}

View File

@ -3,8 +3,8 @@ namespace nur\sery\db\sqlite;
use nur\sery\php\func;
class SqliteMigration {
static function with($migrations): SqliteMigration {
class _Migration {
static function with($migrations): _Migration {
if ($migrations instanceof self) return $migrations;
return new static($migrations);
}

View File

@ -6,7 +6,7 @@ use nur\sery\ValueException;
use SQLite3;
use SQLite3Stmt;
class SqliteQuery {
class _Query {
static function verifix(&$query, ?array &$params=null): void {
if (is_array($query)) {
throw StateException::not_implemented(); #XXX