-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmultiple-filter-on-same-field.php
42 lines (40 loc) · 1.19 KB
/
multiple-filter-on-same-field.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
// all posts whose title contains "foo" or "bar"
return [
'SELECT post1 FROM GraphQLTests\Doctrine\Blog\Model\Post post1 WHERE post1.title LIKE :filter1 OR post1.title LIKE :filter2',
GraphQLTests\Doctrine\Blog\Model\Post::class,
[
'groups' => [
[
'groupLogic' => 'OR',
'conditionsLogic' => 'AND',
'conditions' => [
[
'title' => [
'like' => [
'value' => '%foo%',
'not' => false,
],
],
],
],
],
[
'groupLogic' => 'OR',
'conditionsLogic' => 'AND',
'conditions' => [
[
'title' => [
'like' => [
'value' => '%bar%',
'not' => false,
],
],
],
],
],
],
],
[],
];