Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | protected function compile(string $statement): string |
||
17 | { |
||
18 | $path = $this->getPath($statement); |
||
19 | $field = $this->getField($statement); |
||
20 | $attribute = $this->getAttribute($statement); |
||
21 | |||
22 | if (!empty($path)) { |
||
23 | return \sprintf('(%s->%s->%s)::jsonb @> ?', $field, $path, $attribute); |
||
24 | } |
||
25 | |||
26 | return \sprintf('(%s->%s)::jsonb @> ?', $field, $attribute); |
||
27 | } |
||
29 |