Interface ScanBuilder<T>
- Type Parameters:
T- type of the DynamoDB entity
- All Superinterfaces:
DetachedScan<T>
Builder for DynamoDB scans.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ScanBuilder<T>and(groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions in conjunction.default ScanBuilder<T>and(Consumer<RangeConditionCollector<T>> conditions) One or more filter conditions in conjunction.default ScanBuilder<T>Configures the native scan expression.configure(Consumer<com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression> configurer) Configures the native scan expression.consistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read) Demand consistent reads.filter(com.amazonaws.services.dynamodbv2.model.ConditionalOperator or) Sets the conditional operator for the filter.default ScanBuilder<T>filter(groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions.filter(Consumer<RangeConditionCollector<T>> conditions) One or more filter conditions.inconsistent(com.agorapulse.micronaut.aws.dynamodb.builder.Builders.Read read) Demand inconsistent reads.Select the index on which this scan will be executed.limit(int max) Sets the maximum number of items to be returned from the queries.default ScanBuilder<T>Sets the scan offset by defining the exclusive start hash key (hash key of the last entity returned).Sets the scan offset by defining the exclusive start hash and range key (hash and range key of the last entity returned).default ScanBuilder<T>Limits which properties of the returned entities will be populated.Limits which properties of the returned entities will be populated.default ScanBuilder<T>Limits which properties of the returned entities will be populated.default ScanBuilder<T>or(groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions in disjunction.default ScanBuilder<T>or(Consumer<RangeConditionCollector<T>> conditions) One or more filter conditions in disjunction.page(int page) Sets the desired pagination of the scans.Methods inherited from interface com.agorapulse.micronaut.aws.dynamodb.builder.DetachedScan
count, resolveExpression, scan
-
Method Details
-
consistent
Demand consistent reads.- Parameters:
read- the read keyword- Returns:
- self
-
inconsistent
Demand inconsistent reads.- Parameters:
read- the read keyword- Returns:
- self
-
index
Select the index on which this scan will be executed.- Parameters:
name- the name of the index to be used- Returns:
- self
-
filter
One or more filter conditions.- Parameters:
conditions- consumer to build the conditions- Returns:
- self
-
and
One or more filter conditions in conjunction.- Parameters:
conditions- consumer to build the conditions- Returns:
- self
-
or
One or more filter conditions in disjunction.- Parameters:
conditions- consumer to build the conditions- Returns:
- self
-
filter
default ScanBuilder<T> filter(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions.- Parameters:
conditions- closure to build the conditions- Returns:
- self
-
or
default ScanBuilder<T> or(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions in disjunction.- Parameters:
conditions- closure to build the conditions- Returns:
- self
-
and
default ScanBuilder<T> and(@DelegatesTo(type="com.agorapulse.micronaut.aws.dynamodb.builder.RangeConditionCollector<T>",strategy=1) groovy.lang.Closure<RangeConditionCollector<T>> conditions) One or more filter conditions in conjunction.- Parameters:
conditions- closure to build the conditions- Returns:
- self
-
filter
Sets the conditional operator for the filter. Default isand- Parameters:
or- the conditional operator, usuallyorto switch to disjunction of filter conditions- Returns:
- self
-
page
Sets the desired pagination of the scans. This only sets the optimal pagination of the scans and does not limit the number of items returned. Useto limit the number results returned from the scan.io.reactivex.Flowable#take(long)- Parameters:
page- number of entities loaded by one scan request (not a number of total entities returned)- Returns:
- self
-
limit
Sets the maximum number of items to be returned from the queries. This is a shortcut for callingon the result Flowable.io.reactivex.Flowable#take(long)- Parameters:
max- the maximum number of items returned- Returns:
- self
-
offset
Sets the scan offset by defining the exclusive start hash and range key (hash and range key of the last entity returned).- Parameters:
exclusiveStartKeyValue- exclusive start key hash valueexclusiveRangeStartKey- exclusive start key range value- Returns:
- self
-
offset
Sets the scan offset by defining the exclusive start hash key (hash key of the last entity returned).- Parameters:
exclusiveStartKeyValue- exclusive start key hash value- Returns:
- self
-
configure
ScanBuilder<T> configure(Consumer<com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression> configurer) Configures the native scan expression. This method is an extension point which allows to configure properties which are not provides by this builder.- Parameters:
configurer- consumer to configure the native scan expression- Returns:
- self
-
configure
default ScanBuilder<T> configure(@DelegatesTo(type="com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression",strategy=1) groovy.lang.Closure<Object> configurer) Configures the native scan expression. This method is an extension point which allows to configure properties which are not provides by this builder.- Parameters:
configurer- closure to configure the native scan expression- Returns:
- self
-
only
Limits which properties of the returned entities will be populated.- Parameters:
propertyPaths- property paths to be populated in the returned entities- Returns:
- self
-
only
Limits which properties of the returned entities will be populated.- Parameters:
propertyPaths- property paths to be populated in the returned entities- Returns:
- self
-
only
default ScanBuilder<T> only(@DelegatesTo(type="T",strategy=3) groovy.lang.Closure<Object> collector) Limits which properties of the returned entities will be populated.- Parameters:
collector- closure to collect the property paths- Returns:
- self
-