| Total Complexity | 8 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class SQL { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Returns an array of `?` placeholders. |
||
| 18 | * |
||
| 19 | * @param int|array|Countable $count |
||
| 20 | * @return ExpressionInterface[] |
||
| 21 | */ |
||
| 22 | public static function marks ($count): array { |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Converts an array of columns to `:named` placeholders for prepared queries. |
||
| 31 | * |
||
| 32 | * Qualified columns are slotted as `qualifier__column` (two underscores). |
||
| 33 | * |
||
| 34 | * @param string[] $columns |
||
| 35 | * @return string[] `["column" => ":column"]` |
||
| 36 | */ |
||
| 37 | public static function slots (array $columns): array { |
||
| 38 | $slots = []; |
||
| 39 | foreach ($columns as $column) { |
||
| 40 | $slots[(string)$column] = ':' . str_replace('.', '__', $column); |
||
| 41 | } |
||
| 42 | return $slots; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string[] $columns |
||
| 47 | * @return string[] `["column" => "column=:column"]` |
||
| 48 | */ |
||
| 49 | public static function slotsEqual (array $columns): array { |
||
| 55 | } |
||
| 56 | |||
| 57 | final private function __construct () { } |
||
| 58 | } |