Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class DatabaseQueryBuilder extends Database |
||
12 | { |
||
13 | use QueryBuilderTrait; |
||
14 | |||
15 | |||
16 | |||
17 | /** |
||
18 | * Update builder settings from active configuration. |
||
19 | * |
||
20 | * @return void |
||
21 | */ |
||
22 | 2 | public function setDefaultsFromConfiguration() |
|
23 | { |
||
24 | 2 | if ($this->options['dsn']) { |
|
25 | 2 | $dsn = explode(':', $this->options['dsn']); |
|
26 | 2 | $this->setSQLDialect($dsn[0]); |
|
27 | } |
||
28 | |||
29 | 2 | $this->setTablePrefix($this->options['table_prefix']); |
|
30 | 2 | } |
|
31 | |||
32 | |||
33 | |||
34 | /** |
||
35 | * Execute a SQL-query. |
||
36 | * |
||
37 | * @param string|null|array $query the SQL statement (or $params) |
||
38 | * @param array $params the params array |
||
39 | * |
||
40 | * @return self |
||
41 | */ |
||
42 | 2 | public function execute($query = null, array $params = []) : object |
|
55 | } |
||
56 | } |
||
57 |