|
@@ 1874-1883 (lines=10) @@
|
| 1871 |
|
* @uses dateIsExpression |
| 1872 |
|
* @uses dateNotExpression |
| 1873 |
|
*/ |
| 1874 |
|
protected function createConditionsForDatetimeColumn($field, $query, $alias, $currentUser, $methods) |
| 1875 |
|
{ |
| 1876 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan( |
| 1877 |
|
$methods, |
| 1878 |
|
['is', 'not', 'gt', 'gte', 'lt', 'lte', 'false', 'true'] |
| 1879 |
|
) |
| 1880 |
|
) { |
| 1881 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 1882 |
|
} |
| 1883 |
|
|
| 1884 |
|
return $this->createExpression('date', $field, $query, $alias, $currentUser, $methods); |
| 1885 |
|
} |
| 1886 |
|
|
|
@@ 1906-1916 (lines=11) @@
|
| 1903 |
|
* @uses entityGtExpression |
| 1904 |
|
* @uses entityGteExpression |
| 1905 |
|
*/ |
| 1906 |
|
protected function createConditionsForEntityColumn($field, $query, $alias, $currentUser, $methods) |
| 1907 |
|
{ |
| 1908 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan( |
| 1909 |
|
$methods, |
| 1910 |
|
['false', 'true', 'is', 'not', 'me', 'notme', 'isOrNull', 'lt', 'lte', 'gt', 'gte'] |
| 1911 |
|
)) { |
| 1912 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 1913 |
|
} |
| 1914 |
|
|
| 1915 |
|
return $this->createExpression('entity', $field, $query, $alias, $currentUser, $methods); |
| 1916 |
|
} |
| 1917 |
|
|
| 1918 |
|
/** |
| 1919 |
|
* @param $subquery |
|
@@ 2143-2152 (lines=10) @@
|
| 2140 |
|
* @uses subqueryAnyExpression |
| 2141 |
|
* @uses subqueryNullExpression |
| 2142 |
|
*/ |
| 2143 |
|
protected function createConditionsForIntegerSubquery($subquery, $query, $alias, $currentUser, $methods) |
| 2144 |
|
{ |
| 2145 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan( |
| 2146 |
|
$methods, |
| 2147 |
|
['false', 'true', 'gt', 'gte', 'lt', 'lte', 'eq', 'any', 'null'] |
| 2148 |
|
) |
| 2149 |
|
) { |
| 2150 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 2151 |
|
} |
| 2152 |
|
|
| 2153 |
|
return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods); |
| 2154 |
|
} |
| 2155 |
|
|
|
@@ 2213-2220 (lines=8) @@
|
| 2210 |
|
* @uses subqueryTrueExpression |
| 2211 |
|
* @uses subqueryFalseExpression |
| 2212 |
|
*/ |
| 2213 |
|
protected function createConditionsForDatetimeSubquery($subquery, $query, $alias, $currentUser, $methods) |
| 2214 |
|
{ |
| 2215 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan($methods, ['false', 'true', 'gte', 'lte', 'gt', 'lt'])) { |
| 2216 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 2217 |
|
} |
| 2218 |
|
|
| 2219 |
|
return $this->createExpression('subquery', $subquery, $query, $alias, $currentUser, $methods); |
| 2220 |
|
} |
| 2221 |
|
|
| 2222 |
|
/** |
| 2223 |
|
* Translates params into where conditions. Null values are handled as you would expect it. |
|
@@ 2240-2249 (lines=10) @@
|
| 2237 |
|
* @uses integerFalseExpression |
| 2238 |
|
* @uses integerTrueExpression |
| 2239 |
|
*/ |
| 2240 |
|
protected function createConditionsForIntegerColumn($col, $query, $alias, $currentUser, $methods) |
| 2241 |
|
{ |
| 2242 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan( |
| 2243 |
|
$methods, |
| 2244 |
|
['is', 'not', 'gt', 'gte', 'lt', 'lte', 'false', 'true'] |
| 2245 |
|
) |
| 2246 |
|
) { |
| 2247 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 2248 |
|
} |
| 2249 |
|
|
| 2250 |
|
return $this->createExpression('integer', $col, $query, $alias, $currentUser, $methods); |
| 2251 |
|
} |
| 2252 |
|
|
|
@@ 2277-2286 (lines=10) @@
|
| 2274 |
|
* @uses integerTrueExpression |
| 2275 |
|
* @uses integerAnyExpression |
| 2276 |
|
*/ |
| 2277 |
|
protected function createConditionsForIntegerColumnInternal($col, $query, $alias, $currentUser, $methods) |
| 2278 |
|
{ |
| 2279 |
|
if (\UnserAllerLib_Tool_Array::hasMoreKeysThan( |
| 2280 |
|
$methods, |
| 2281 |
|
['is', 'not', 'gt', 'gte', 'lt', 'lte', 'false', 'true', 'any'] |
| 2282 |
|
) |
| 2283 |
|
) { |
| 2284 |
|
throw new \InvalidArgumentException('Invalid expression methods used'); |
| 2285 |
|
} |
| 2286 |
|
|
| 2287 |
|
return $this->createExpression('integer', $col, $query, $alias, $currentUser, $methods); |
| 2288 |
|
} |
| 2289 |
|
|