T
- type of the DynamoDB entitypublic interface QueryBuilder<T> extends DetachedQuery<T>
Modifier and Type | Method and Description |
---|---|
default QueryBuilder<T> |
and(groovy.lang.Closure<RangeConditionCollector<T>> conditions)
One or more range key filter conditions in conjunction.
|
default QueryBuilder<T> |
and(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
One or more range key filter conditions in conjunction.
|
default QueryBuilder<T> |
configure(groovy.lang.Closure<java.lang.Object> configurer)
Configures the native query expression.
|
QueryBuilder<T> |
configure(java.util.function.Consumer<com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T>> configurer)
Configures the native query expression.
|
QueryBuilder<T> |
consistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
Demand consistent reads.
|
default QueryBuilder<T> |
filter(groovy.lang.Closure<RangeConditionCollector<T>> conditions)
One or more range key filter conditions.
|
QueryBuilder<T> |
filter(com.amazonaws.services.dynamodbv2.model.ConditionalOperator or)
Sets the conditional operator for the filter.
|
QueryBuilder<T> |
filter(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
One or more range key filter conditions.
|
QueryBuilder<T> |
hash(java.lang.Object key)
Sets the hash key value for the query.
|
QueryBuilder<T> |
inconsistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
Demand inconsistent reads.
|
QueryBuilder<T> |
index(java.lang.String name)
Select the index on which this query will be executed.
|
QueryBuilder<T> |
limit(int max)
Sets the maximum number of items to be returned from the queries.
|
default QueryBuilder<T> |
offset(java.lang.Object exclusiveStartKeyValue)
Sets the query offset by defining the exclusive start hash key (hash key of the last entity returned).
|
QueryBuilder<T> |
offset(java.lang.Object exclusiveStartKeyValue,
java.lang.Object exclusiveRangeStartKey)
Sets the query offset by defining the exclusive start hash and range key (hash and range key of the last entity returned).
|
default QueryBuilder<T> |
only(groovy.lang.Closure<java.lang.Object> collector)
Limits which properties of the returned entities will be populated.
|
QueryBuilder<T> |
only(java.lang.Iterable<java.lang.String> propertyPaths)
Limits which properties of the returned entities will be populated.
|
default QueryBuilder<T> |
only(java.lang.String... propertyPaths)
Limits which properties of the returned entities will be populated.
|
default QueryBuilder<T> |
or(groovy.lang.Closure<RangeConditionCollector<T>> conditions)
One or more range key filter conditions in disjunction.
|
default QueryBuilder<T> |
or(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
One or more range key filter conditions in disjunction.
|
QueryBuilder<T> |
page(int page)
Sets the desired pagination of the queries.
|
default QueryBuilder<T> |
range(groovy.lang.Closure<RangeConditionCollector<T>> conditions)
One or more range key conditions.
|
QueryBuilder<T> |
range(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
One or more range key conditions.
|
QueryBuilder<T> |
sort(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Sort sort)
Sort the results by the range index
|
count, query, resolveExpression
QueryBuilder<T> sort(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Sort sort)
sort
- the sort keywordQueryBuilder<T> consistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
read
- the read keywordQueryBuilder<T> inconsistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read)
read
- the read keywordQueryBuilder<T> index(java.lang.String name)
name
- the name of the index to be usedQueryBuilder<T> hash(java.lang.Object key)
key
- the hash key of the query or an instance of the object with the hash key setQueryBuilder<T> range(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
conditions
- consumer to build the conditionsdefault QueryBuilder<T> range(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
conditions
- closure to build the conditionsQueryBuilder<T> filter(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
conditions
- consumer to build the conditionsdefault QueryBuilder<T> or(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
These conditions are resolved on the result set before returning the values and therefore they don't require an existing index but they consume more resources as all the result set must be traversed.
conditions
- consumer to build the conditionsdefault QueryBuilder<T> and(java.util.function.Consumer<RangeConditionCollector<T>> conditions)
These conditions are resolved on the result set before returning the values and therefore they don't require an existing index but they consume more resources as all the result set must be traversed.
conditions
- consumer to build the conditionsdefault QueryBuilder<T> filter(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
conditions
- closure to build the conditionsdefault QueryBuilder<T> or(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
conditions
- closure to build the conditionsdefault QueryBuilder<T> and(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions)
conditions
- closure to build the conditionsQueryBuilder<T> filter(com.amazonaws.services.dynamodbv2.model.ConditionalOperator or)
and
or
- the conditional operator, usually or
to switch to disjunction of filter conditionsQueryBuilder<T> page(int page)
io.reactivex.Flowable#take(long)
to limit the number results returned from the query.page
- number of entities loaded by one query request (not a number of total entities returned)QueryBuilder<T> limit(int max)
io.reactivex.Flowable#take(long)
on the result Flowable.max
- the maximum number of items returnedQueryBuilder<T> offset(java.lang.Object exclusiveStartKeyValue, java.lang.Object exclusiveRangeStartKey)
exclusiveStartKeyValue
- exclusive start key hash valueexclusiveRangeStartKey
- exclusive start key range valuedefault QueryBuilder<T> offset(java.lang.Object exclusiveStartKeyValue)
exclusiveStartKeyValue
- exclusive start key hash valueQueryBuilder<T> configure(java.util.function.Consumer<com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T>> configurer)
configurer
- consumer to configure the native query expressiondefault QueryBuilder<T> configure(@DelegatesTo(type="com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T>",strategy=1) groovy.lang.Closure<java.lang.Object> configurer)
configurer
- closure to configure the native query expressionQueryBuilder<T> only(java.lang.Iterable<java.lang.String> propertyPaths)
propertyPaths
- property paths to be populated in the returned entitiesdefault QueryBuilder<T> only(java.lang.String... propertyPaths)
propertyPaths
- property paths to be populated in the returned entitiesdefault QueryBuilder<T> only(@DelegatesTo(type="T",strategy=3) groovy.lang.Closure<java.lang.Object> collector)
collector
- closure to collect the property paths