Total Complexity | 12 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 87.5% |
Changes | 0 |
1 | <?php |
||
14 | final class CommandPDO extends AbstractCommandPDO |
||
15 | { |
||
16 | /** |
||
17 | * @inheritDoc |
||
18 | */ |
||
19 | 6 | public function insertEx(string $table, array $columns): bool|array |
|
20 | { |
||
21 | 6 | $params = []; |
|
22 | 6 | $sql = $this->queryBuilder()->insertEx($table, $columns, $params); |
|
23 | |||
24 | 6 | $this->setSql($sql)->bindValues($params); |
|
25 | 6 | $this->prepare(false); |
|
26 | |||
27 | /** @psalm-var array|bool $result */ |
||
28 | 6 | $result = $this->queryOne(); |
|
29 | |||
30 | 6 | return is_array($result) ? $result : false; |
|
31 | } |
||
32 | |||
33 | 236 | public function queryBuilder(): QueryBuilderInterface |
|
34 | { |
||
35 | 236 | return $this->db->getQueryBuilder(); |
|
36 | } |
||
37 | |||
38 | 199 | protected function internalExecute(string|null $rawSql): void |
|
63 | } |
||
64 | } |
||
65 | } |
||
68 |