Build the predicate for the specified filter. Supported operators: .----------------------------------------------—.
operator | arg0 | arg1 |
and | assoc. array | assoc. array |
or | assoc. array | assoc. array |
equals | property name | value |
notEquals | property name | value |
enum | property name | array |
stringEquals | property name | value |
stringNotEquals | property name | value |
stringContains | property name | value |
stringStartsWith | property name | value |
stringEnum | property name | array |
not | assoc. array | |
less | property name | value |
greater | property name | value |
lessEqual | property name | value |
greaterEqual | property name | value |
distinct | property name | |
'----------------------------------------------—' Example 1: [type='bond' and devicename='bond0'] The filter for the above predicate: [ "operator": "and", "arg0": [ "operator" => "stringEquals", "arg0" => "type", "arg1" => "bond" ], "arg1": [ "operator" => "stringEquals", "arg0" => "devicename", "arg1" => "bond0" ] ] Example 2: [type='bond' and contains(slaves,'eth0')] The filter for the above predicate: [ "operator": "and", "arg0": [ "operator" => "stringEquals", "arg0" => "type", "arg1" => "bond" ], "arg1": [ "operator" => "stringContains", "arg0" => "slaves", "arg1" => "eth0" ] ] Example 3: [not type='vlan'] The filter for the above predicate: [ "operator": "not", "arg0": [ "operator" => "stringEquals", "arg0" => "type", "arg1" => "vlan" ] ] Example 4: [ "operator" => "and", "arg0" => [ "operator" => "stringNotEquals", "arg0" => "uuid", "arg1" => $object->get("uuid") ], "arg1" => [ "operator" => "and", "arg0" => [ "operator" => "stringEquals", "arg0" => "mntentref", "arg1" => $object->get("mntentref") ], "arg1" => [ "operator" => "stringEquals", "arg0" => "reldirpath", "arg1" => $object->get("reldirpath") ] ] ]
- Parameters
-
filter | A filter specifying constraints to build the database query. |
- Returns
- The database query string.
- Exceptions
-