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