Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | trait Query |
||
21 | { |
||
22 | /** |
||
23 | * Raw execute |
||
24 | * @inheritDoc |
||
25 | */ |
||
26 | public static function execute(string $query, array $parameters = []): bool |
||
27 | { |
||
28 | return (self::$ormClass)::raw_execute($query, $parameters); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Raw query |
||
33 | * @inheritDoc |
||
34 | */ |
||
35 | public static function query(string $query, array $parameters = []): array |
||
36 | { |
||
37 | return (self::$ormClass)::for_table('dummy')->raw_query($query, $parameters)->find_array(); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Gets the last query executed |
||
42 | * @inheritDoc |
||
43 | */ |
||
44 | public static function lastQuery(): string |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Returns the PDOStatement instance last used |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public static function lastStatement(): object |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Get an array containing all the queries |
||
60 | * run on a specified connection up to now. |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | public static function queryLog(): array |
||
68 | } |
||
69 | |||
70 | } |