Query(params)

new Query(params)

Create an iterator instance.
Parameters:
Name Type Description
params Object
Properties
Name Type Description
ModelCls Class The model class.
writeBatcher __WriteBatcher An instance of __WriteBatcher
options Object Iterator options
Properties
Name Type Attributes Default Description
allowLazyFilter Boolean <optional>
false Filtering on non-key fields in query, and any fields in scan is performed after data is retrieved from db server node, but before data is returned to client. By default, this library forbids these filters by throwing exception as they cause slow operations. By allowing lazy filter, the exception is suppressed.
descending Boolean <optional>
false Only available in query, controls ordering based on sort key.
Properties:
Name Type Attributes Default Description
params.options.inconsistentRead Boolean <optional>
false When true, a strongly consistent read is performed. Note: Consistent read(inconsistentRead=false) only available when query or scan is performed on Model or LocalSecondaryIndex. To retrieve more recent results when scanning GlobalSecondaryIndex, enabling `bypassCache` instead.
params.options.bypassCache Boolean <optional>
false DAX stores `Scan` and `Query` request results in its query cache, and the cache is not invalidated by DynamoDB updates. Set this to true to skip the DAX cache for more up-to-date results.
params.options.cacheModels Boolean <optional>
false Whether to cache models already retrieved from the database. When off, getting a model with the same key the second time in the same transaction results in an error. When on, `get`ting the same key simply returns the cached model. Previous modifications done to the model are reflected in the returned model.