@ThreadSafe public interface QueryConditional
Example:
QueryConditional sortValueGreaterThanFour = QueryConditional.sortGreaterThan(k -> k.partitionValue(10).sortValue(4));
Modifier and Type | Method and Description |
---|---|
Expression |
expression(TableSchema<?> tableSchema,
String indexName)
Generates a conditional
Expression based on specific context that is supplied as arguments. |
static QueryConditional |
keyEqualTo(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index is equal to a specific value. |
static QueryConditional |
keyEqualTo(Key key)
Creates a
QueryConditional that matches when the key of an index is equal to a specific value. |
static QueryConditional |
sortBeginsWith(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index begins with a specific value. |
static QueryConditional |
sortBeginsWith(Key key)
Creates a
QueryConditional that matches when the key of an index begins with a specific value. |
static QueryConditional |
sortBetween(Consumer<Key.Builder> keyFromConsumer,
Consumer<Key.Builder> keyToConsumer)
Creates a
QueryConditional that matches when the key of an index is between two specific values. |
static QueryConditional |
sortBetween(Key keyFrom,
Key keyTo)
Creates a
QueryConditional that matches when the key of an index is between two specific values. |
static QueryConditional |
sortGreaterThan(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index is greater than a specific value. |
static QueryConditional |
sortGreaterThan(Key key)
Creates a
QueryConditional that matches when the key of an index is greater than a specific value. |
static QueryConditional |
sortGreaterThanOrEqualTo(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index is greater than or equal to a specific
value. |
static QueryConditional |
sortGreaterThanOrEqualTo(Key key)
Creates a
QueryConditional that matches when the key of an index is greater than or equal to a specific
value. |
static QueryConditional |
sortLessThan(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index is less than a specific value. |
static QueryConditional |
sortLessThan(Key key)
Creates a
QueryConditional that matches when the key of an index is less than a specific value. |
static QueryConditional |
sortLessThanOrEqualTo(Consumer<Key.Builder> keyConsumer)
Creates a
QueryConditional that matches when the key of an index is less than or equal to a specific
value. |
static QueryConditional |
sortLessThanOrEqualTo(Key key)
Creates a
QueryConditional that matches when the key of an index is less than or equal to a specific
value. |
static QueryConditional keyEqualTo(Key key)
QueryConditional
that matches when the key of an index is equal to a specific value.key
- the literal key used to compare the value of the index againststatic QueryConditional keyEqualTo(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index is equal to a specific value.keyConsumer
- 'builder consumer' for the literal key used to compare the value of the index againststatic QueryConditional sortGreaterThan(Key key)
QueryConditional
that matches when the key of an index is greater than a specific value.key
- the literal key used to compare the value of the index againststatic QueryConditional sortGreaterThan(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index is greater than a specific value.keyConsumer
- 'builder consumer' for the literal key used to compare the value of the index againststatic QueryConditional sortGreaterThanOrEqualTo(Key key)
QueryConditional
that matches when the key of an index is greater than or equal to a specific
value.key
- the literal key used to compare the value of the index againststatic QueryConditional sortGreaterThanOrEqualTo(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index is greater than or equal to a specific
value.keyConsumer
- 'builder consumer' for the literal key used to compare the value of the index againststatic QueryConditional sortLessThan(Key key)
QueryConditional
that matches when the key of an index is less than a specific value.key
- the literal key used to compare the value of the index againststatic QueryConditional sortLessThan(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index is less than a specific value.keyConsumer
- 'builder consumer' for the literal key used to compare the value of the index againststatic QueryConditional sortLessThanOrEqualTo(Key key)
QueryConditional
that matches when the key of an index is less than or equal to a specific
value.key
- the literal key used to compare the value of the index againststatic QueryConditional sortLessThanOrEqualTo(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index is less than or equal to a specific
value.keyConsumer
- 'builder consumer' for the literal key used to compare the value of the index againststatic QueryConditional sortBetween(Key keyFrom, Key keyTo)
QueryConditional
that matches when the key of an index is between two specific values.keyFrom
- the literal key used to compare the start of the range to compare the value of the index againstkeyTo
- the literal key used to compare the end of the range to compare the value of the index againststatic QueryConditional sortBetween(Consumer<Key.Builder> keyFromConsumer, Consumer<Key.Builder> keyToConsumer)
QueryConditional
that matches when the key of an index is between two specific values.keyFromConsumer
- 'builder consumer' for the literal key used to compare the start of the range to compare
the value of the index againstkeyToConsumer
- 'builder consumer' for the literal key used to compare the end of the range to compare the
value of the index againststatic QueryConditional sortBeginsWith(Key key)
QueryConditional
that matches when the key of an index begins with a specific value.key
- the literal key used to compare the start of the value of the index againststatic QueryConditional sortBeginsWith(Consumer<Key.Builder> keyConsumer)
QueryConditional
that matches when the key of an index begins with a specific value.keyConsumer
- 'builder consumer' the literal key used to compare the start of the value of the index
againstExpression expression(TableSchema<?> tableSchema, String indexName)
Expression
based on specific context that is supplied as arguments.tableSchema
- A TableSchema
that this expression will be used withindexName
- The specific index name of the index this expression will be used withExpression
that can be used as part of a query requestCopyright © 2022. All rights reserved.