Modifier and Type | Class and Description |
---|---|
static class |
Query.InvalidExpressionException
Exception thrown when a query expression is not valid in some context.
|
Modifier and Type | Method and Description |
---|---|
static QueryComponent |
and(List<? extends QueryComponent> operands)
Check that a set of components all evaluate to true for a given record.
|
static QueryComponent |
and(QueryComponent first,
QueryComponent second,
QueryComponent... operands)
Check that a set of components all evaluate to true for a given record.
|
static Field |
field(String name)
Creates a new Field context.
|
static boolean |
isSingleFieldComparison(QueryComponent component) |
static QueryKeyExpression |
keyExpression(KeyExpression keyExpression)
Build query components using a key expression.
|
static QueryComponent |
not(QueryComponent operand)
Negate a component test.
|
static QueryComponent |
or(List<QueryComponent> operands)
Check that a set of components all evaluate to true for a given record.
|
static QueryComponent |
or(QueryComponent first,
QueryComponent second,
QueryComponent... operands)
Check that any of a set of components evaluate to true for a given record.
|
static QueryRecordFunction<Long> |
rank(GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record.
|
static QueryRecordFunction<Long> |
rank(String fieldName)
A record function that can be used to determine or compare the rank value for a record.
|
static QueryRecordFunction<Long> |
timeWindowRank(int type,
long timestamp,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window.
|
static QueryRecordFunction<Long> |
timeWindowRank(int type,
long timestamp,
String typeParameter,
String timestampParameter,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window.
|
static QueryRecordFunction<Long> |
timeWindowRank(String typeParameter,
String timestampParameter,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window.
|
static QueryRecordFunction<Long> |
timeWindowRank(TimeWindowForFunction timeWindow,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window.
|
static QueryRecordFunction<Tuple> |
timeWindowRankAndEntry(int type,
long timestamp,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window and the score entry that determined that rank.
|
static QueryRecordFunction<Tuple> |
timeWindowRankAndEntry(int type,
long timestamp,
String typeParameter,
String timestampParameter,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window and the score entry that determined that rank.
|
static QueryRecordFunction<Tuple> |
timeWindowRankAndEntry(String typeParameter,
String timestampParameter,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window and the score entry that determined that rank.
|
static QueryRecordFunction<Tuple> |
timeWindowRankAndEntry(TimeWindowForFunction timeWindow,
GroupingKeyExpression operand)
A record function that can be used to determine or compare the rank value for a record for a time window and the score entry that determined that rank.
|
static QueryRecordFunction<FDBRecordVersion> |
version()
A record function that can be used to determine the version of a record.
|
@Nonnull public static Field field(@Nonnull String name)
name
- the name of the field@Nonnull public static QueryComponent and(@Nonnull QueryComponent first, @Nonnull QueryComponent second, @Nonnull QueryComponent... operands)
first
- the first assertionsecond
- the second assertionoperands
- any other assertions@Nonnull public static QueryComponent and(@Nonnull List<? extends QueryComponent> operands)
operands
- assertions@Nonnull public static QueryComponent or(@Nonnull QueryComponent first, @Nonnull QueryComponent second, @Nonnull QueryComponent... operands)
first
- the first assertionsecond
- the second assertionoperands
- any other assertions@Nonnull public static QueryComponent or(@Nonnull List<QueryComponent> operands)
operands
- assertions@Nonnull public static QueryComponent not(@Nonnull QueryComponent operand)
operand
- assertion to be negated@Nonnull public static QueryRecordFunction<Long> rank(@Nonnull GroupingKeyExpression operand)
operand
- the argument to rank@Nonnull public static QueryRecordFunction<Long> rank(@Nonnull String fieldName)
fieldName
- the argument to rank@Nonnull public static QueryRecordFunction<Long> timeWindowRank(@Nonnull TimeWindowForFunction timeWindow, @Nonnull GroupingKeyExpression operand)
timeWindow
- the time window for which to get the rankoperand
- the argument to rank@Nonnull public static QueryRecordFunction<Long> timeWindowRank(int type, long timestamp, @Nullable String typeParameter, @Nullable String timestampParameter, @Nonnull GroupingKeyExpression operand)
type
- the type of time windowtimestamp
- the target timestamptypeParameter
- the name of the time window type parameter if it is a parametertimestampParameter
- the name of the timestamp parameter if it is a parameteroperand
- the argument to rank@Nonnull public static QueryRecordFunction<Long> timeWindowRank(int type, long timestamp, @Nonnull GroupingKeyExpression operand)
type
- the type of time windowtimestamp
- the target timestampoperand
- the argument to rank@Nonnull public static QueryRecordFunction<Long> timeWindowRank(@Nonnull String typeParameter, @Nonnull String timestampParameter, @Nonnull GroupingKeyExpression operand)
typeParameter
- the name of the time window type parametertimestampParameter
- the name of the timestamp parameteroperand
- the argument to rank@Nonnull public static QueryRecordFunction<Tuple> timeWindowRankAndEntry(@Nonnull TimeWindowForFunction timeWindow, @Nonnull GroupingKeyExpression operand)
null
if the record has no entry within the specified time window or else a Tuple
of rank, value, timestamp, and any other values in the specified operand's items.timeWindow
- the time window for which to get the rankoperand
- the argument to rankTuple
of the rank and the corresponding entry@Nonnull public static QueryRecordFunction<Tuple> timeWindowRankAndEntry(int type, long timestamp, @Nullable String typeParameter, @Nullable String timestampParameter, @Nonnull GroupingKeyExpression operand)
null
if the record has no entry within the specified time window or else a Tuple
of rank, value, timestamp, and any other values in the specified operand's items.type
- the type of time windowtimestamp
- the target timestamptypeParameter
- the name of the time window type parameter if it is a parametertimestampParameter
- the name of the timestamp parameter if it is a parameteroperand
- the argument to rank@Nonnull public static QueryRecordFunction<Tuple> timeWindowRankAndEntry(int type, long timestamp, @Nonnull GroupingKeyExpression operand)
null
if the record has no entry within the specified time window or else a Tuple
of rank, value, timestamp, and any other values in the specified operand's items.type
- the type of time windowtimestamp
- the target timestampoperand
- the argument to rank@Nonnull public static QueryRecordFunction<Tuple> timeWindowRankAndEntry(@Nonnull String typeParameter, @Nonnull String timestampParameter, @Nonnull GroupingKeyExpression operand)
null
if the record has no entry within the specified time window or else a Tuple
of rank, value, timestamp, and any other values in the specified operand's items.typeParameter
- the name of the time window type parametertimestampParameter
- the name of the timestamp parameteroperand
- the argument to rank@Nonnull public static QueryRecordFunction<FDBRecordVersion> version()
@Nonnull @API(value=EXPERIMENTAL) public static QueryKeyExpression keyExpression(@Nonnull KeyExpression keyExpression)
keyExpression
- the key expression to compare with valuesQueryKeyExpression
for matchingpublic static boolean isSingleFieldComparison(@Nonnull QueryComponent component)