1 | <?php |
||
9 | final class MicroDbalAdapter implements DatabaseClientInterface |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var CrudClientInterface |
||
14 | */ |
||
15 | private $crudClient; |
||
16 | |||
17 | /** |
||
18 | * @var RawClientInterface |
||
19 | */ |
||
20 | private $rawClient; |
||
21 | |||
22 | public function __construct(CrudClientInterface $crudClient, RawClientInterface $rawClient) |
||
27 | |||
28 | /** |
||
29 | * Executes a query for data. |
||
30 | * |
||
31 | * @param string $queryString The native query string, with place holders for the data bindings |
||
32 | * @param array $bindingsList The data bindings to be injected in the query, escaped and formatted in the correct |
||
33 | * data type, according to the native data engine being used. |
||
34 | * Ie: ['bindingName' => 'value', 'otherBindingName' => 1, ...] |
||
35 | */ |
||
36 | public function executeQuery(string $queryString, array $bindingsList = []): array |
||
40 | |||
41 | public function create(string $table, array $data) |
||
45 | |||
46 | public function read(string $table, array $filter = [], array $orderBy = [], int $limit = null, int $offset = 1): array |
||
50 | |||
51 | public function update(string $table, array $data, array $filter = []) |
||
55 | } |
||
56 |