Methods
(async) close()
Closes the cursor. Obtaining elements from the results is not possible after this.
This method should be called if no more elements are needed. It is not neccessary to call it if all elements have been already obtained.
(async) getAll() → {Promise.<Array.<CacheEntry>>}
Returns all elements (cache entries - key-value pairs) from the query results.
May be used instead of getValue() method if the number of returned entries is relatively small and will not cause memory utilization issues.
Returns:
- all cache entries (key-value pairs) returned by SQL or Scan query.
- Type
- Promise.<Array.<CacheEntry>>
(async) getValue() → {Promise.<CacheEntry>}
Returns one element (cache entry - key-value pair) from the query results.
Every new call returns the next cache entry from the query results. If the method returns null, no more entries are available.
Returns:
- a cache entry (key-value pair).
- Type
- Promise.<CacheEntry>
hasMore() → {boolean}
Checks if more elements are available in the query results.
Returns:
- true if more cache entries are available, false otherwise.
- Type
- boolean