public class QueryBuilder extends Object
import staticfor these helper methods.
Modifier and Type | Method and Description |
---|---|
static QueryNode |
disjunct(Node... n)
Create a disjunct node.
|
static QueryNode |
disjunct(String field,
String... values)
Create a disjunct node using one or more values.
|
static QueryNode |
disjunct(String field,
Value... values)
Create a disjunct node using one or more values.
|
static QueryNode |
disjunctUnion(Node... n)
Create a disjunct union node.
|
static QueryNode |
disjunctUnion(String field,
String... values) |
static QueryNode |
disjunctUnion(String field,
Value... values) |
static QueryNode |
intersect(Node... n)
Create a new intersection node with child nodes.
|
static QueryNode |
intersect(String field,
String stringValue)
Helper method to create a new intersection node with a string value.
|
static QueryNode |
intersect(String field,
Value... values)
Create a new intersection node with a field-value pair.
|
static QueryNode |
optional(Node... n)
Create an optional node.
|
static QueryNode |
optional(String field,
Value... values) |
static QueryNode |
union(Node... n)
Create a union node.
|
static QueryNode |
union(String field,
String... values)
Convenience method to match one or more strings.
|
static QueryNode |
union(String field,
Value... values)
Create a union node which can match an one or more values
|
public static QueryNode intersect(Node... n)
n
- sub-condition to addpublic static QueryNode intersect(String field, Value... values)
field
- The field that should contain this value. If this value is empty, then any field
will be checked.values
- Value to check for. The node will be true only if the field (or any field)
contains all of the valuespublic static QueryNode intersect(String field, String stringValue)
field
- The field to check. If left null or empty, all fields will be checked.stringValue
- The value to checkpublic static QueryNode union(Node... n)
n
- Child nodepublic static QueryNode union(String field, Value... values)
field
- Field to check. If empty, all fields are checkedvalues
- Values to search for. The node evaluates to true if field
matches
any of the valuespublic static QueryNode union(String field, String... values)
union(field, value(v1), value(v2), value(v3)) ...
field
- Field to matchvalues
- Strings to check forpublic static QueryNode disjunct(Node... n)
n
- Child nodes to addpublic static QueryNode disjunct(String field, Value... values)
field
- Field to check for (empty or null for any field)values
- The values to check forpublic static QueryNode disjunct(String field, String... values)
field
- Field to check for (empty or null for any field)values
- The values to check forpublic static QueryNode disjunctUnion(Node... n)
n
- public static QueryNode optional(Node... n)
n
- The node to evaluate as optionalCopyright © 2021 RedisLabs. All rights reserved.