nur-sery/nur_src/m/pdo/mysql/MysqlQuery.php

29 lines
868 B
PHP
Raw Normal View History

2023-12-03 22:10:18 +04:00
<?php
namespace nur\m\pdo\mysql;
2024-05-31 14:20:20 +04:00
use nur\m\IQuery;
2023-12-03 22:10:18 +04:00
use nur\m\IRowIncarnation;
use nur\m\pdo\PdoQuery;
2024-05-31 14:20:20 +04:00
use nur\sery\db\mysql\query;
2023-12-03 22:10:18 +04:00
class MysqlQuery extends PdoQuery {
protected function newRowIncarnation(): IRowIncarnation {
return new MysqlRowIncarnation();
}
2024-05-31 14:20:20 +04:00
function select($sql=null, ?array $filter=null): IQuery {
if (is_array($sql)) [$sql, $filter] = query::with($sql, $filter);
return parent::select($sql, $filter);
}
function update($sql=null, ?array $filter=null, $row=null, ?array &$results=null): IQuery {
if (is_array($sql)) [$sql, $filter] = query::with($sql, $filter);
return parent::update($sql, $filter, $row, $results);
}
function insert($sql=null, $row=null, ?array &$results=null): IQuery {
if (is_array($sql)) [$sql, $row] = query::with($sql, $row);
return parent::insert($sql, $row, $results);
}
2023-12-03 22:10:18 +04:00
}