Skip to main content

Type Alias: GetIndexScanIterator

GetIndexScanIterator = (indexName, fromSecondaryKey, fromPrimaryKey) => IterableUnion<readonly [IndexKey, ReadonlyJSONValue]>

When using makeScanResult this is the type used for the function called when doing a scan with an indexName.

Parameters​

indexName​

string

The name of the index we are scanning over.

fromSecondaryKey​

string

The fromSecondaryKey is computed by scan and is the secondary key of the first entry to return in the iterator. It is based on prefix and start.key of the ScanIndexOptions.

fromPrimaryKey​

string | undefined

The fromPrimaryKey is computed by scan and is the primary key of the first entry to return in the iterator. It is based on prefix and start.key of the ScanIndexOptions.

Returns​

IterableUnion<readonly [IndexKey, ReadonlyJSONValue]>