@@ 100-105 (lines=6) @@ | ||
97 | protected function buildQueryForAnd($queryBuilder, $key, $value) |
|
98 | { |
|
99 | $sqlOptions = self::buildFilter([$key => $value]); |
|
100 | if (in_array($sqlOptions['method'], ['in', 'notIn'])) { |
|
101 | $queryBuilder->andWhere( |
|
102 | $queryBuilder->expr()->{$sqlOptions['method']}( $sqlOptions['key'], $sqlOptions['value']) |
|
103 | ); |
|
104 | return $queryBuilder; |
|
105 | } |
|
106 | $queryBuilder->andWhere( |
|
107 | '`'.$sqlOptions['key'].'`' |
|
108 | . ' ' . $sqlOptions['operand'] |
|
@@ 120-123 (lines=4) @@ | ||
117 | $subKey = array_keys($orValue)[0]; |
|
118 | $subValue = $orValue[$subKey]; |
|
119 | $sqlOptions = self::buildFilter([$subKey => $subValue]); |
|
120 | if (in_array($sqlOptions['method'], ['in', 'notIn'])) { |
|
121 | $orQuery[] = $queryBuilder->expr()->{$sqlOptions['method']}( $sqlOptions['key'], $sqlOptions['value']); |
|
122 | continue; |
|
123 | } |
|
124 | $orQuery[] = |
|
125 | '`'.$sqlOptions['key'].'`' |
|
126 | . ' ' . $sqlOptions['operand'] |