Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
DB | |
100.00% |
4 / 4 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
query | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
execute | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
run | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Projom\Storage\Query; |
6 | |
7 | use Projom\Storage\Engine; |
8 | use Projom\Storage\Query\Action; |
9 | use Projom\Storage\Query\Util; |
10 | |
11 | class DB |
12 | { |
13 | public static function query(string|array $collections, null|array $options = null): mixed |
14 | { |
15 | $collections = Util::stringToArray($collections); |
16 | return Engine::dispatch(Action::QUERY, args: [$collections, $options]); |
17 | } |
18 | |
19 | public static function execute(array $args): mixed |
20 | { |
21 | return Engine::dispatch(Action::EXECUTE, args: $args); |
22 | } |
23 | |
24 | public static function run(Action $action, array $args): mixed |
25 | { |
26 | return Engine::dispatch($action, args: $args); |
27 | } |
28 | } |