Entity type.
TranscodeMap indicating transcodable types. Defaults to DefaultTranscodeMap.
Creates a new MockDb instance.
Array of data items to query.
Mean delay in ms. If omitted or undefined, methods will be synchronous.
Standard deviation of delay in ms. Default is 20.
Replicates the functionality of DynamoDB scan/query. Runs asynchronously with a normally-disributed delay.
QueryOptions object.
Mean delay in ms, overrides constructor delayMean.
Standard deviation of delay in ms, overrides constructor
delayStd.
QueryReturn object Promise.
Pass hashKey and hashValue to restrict your search to a specific data
partition like a DynamoDB query operation. Otherwise, search will be
performed across partitions like a DynamoDB scan.
Pass limit to return a limited record set and pageKey for the next
data page.
Pass sortOrder to sort the result set by specific keys. See SortOrder for more info.
Pass filter to filter records based on a custom function.
See the QueryOptions interface for more info on
query options.
Replicates the functionality of DynamoDB scan/query. Runs synchronously.
QueryOptions object.
QueryReturn object.
Pass hashKey and hashValue to restrict your search to a specific data
partition like a DynamoDB query operation. Otherwise, search will be
performed across partitions like a DynamoDB scan.
Pass limit to return a limited record set and pageKey for the next
data page.
Pass sortOrder to sort the result set by a specific set of keys. See SortOrder for more info.
Pass filter to filter records based on a custom function.
See the QueryOptions interface for more info on
query options.
Replicates a limited set of DynamoDB behaviors on local JSON data for testing purposes.
Remarks
This class is intended to replicate essential DynamoDB behaviors, not the actual API!
For example, the
querymethod acceptshashKey&sortOrderas arguments and returns limited record sets withpageKey. It will accept afilterfunction, but makes no attempt to replicate DynamoDB query syntax.All methods can be run synchronously, or asynchronously with a normally- distributed delay.