Class: Query

Query

A query for Sequence items.


new Query()

Methods


all()

Iterate over all query results. Returns an async iterator over the query results.

Returns:

an async iterator over the query results.

Type
AsyncIterableIterator
Example

Example usage.

for async (const key of ledger.keys.list().all()) {
  console.log("key id: " + key.id)
}

See https://github.com/tc39/proposal-async-iteration for more
information about async iterators.

page(params)

Retrieve a page of results.

Parameters:
Name Type Default Description
params Object {}

Filter and pagination information.

Properties
Name Type Description
cursor String

Cursor for retrieving additional items from a previous call to the query.

size Number

Number of items to return in result set.

Returns:

Requested page of results.

Type
Page