Skip to content

DataClient

eachPage<V>(query?, options?): AsyncGenerator<RecordsPage<V>, void, undefined>

Every page of a query as an async iterator. The query is captured once and replayed unchanged for each page.

V = Record<string, unknown>

Omit<RecordsQuery, "cursor">

CallOptions

AsyncGenerator<RecordsPage<V>, void, undefined>


eachRecord<V>(query?, options?): AsyncGenerator<DataRecord<V>, void, undefined>

Every record a query matches, one at a time.

V = Record<string, unknown>

Omit<RecordsQuery, "cursor">

CallOptions

AsyncGenerator<DataRecord<V>, void, undefined>


models(options?): Promise<ModelsResult>

The models this key may read, each with the fields it may see and what it may query. Read this before querying.

CallOptions

Promise<ModelsResult>


record<V>(key, options?): Promise<DataRecord<V> | null>

One record, or null when there is none (or the key may not read it). throwIfMissing makes that an error.

V = Record<string, unknown>

string

RecordOptions & CallOptions

Promise<DataRecord<V> | null>


recordResponse<V>(key, options?): Promise<RecordResponse<V>>

The primitive under record: keeps the ETag, and sends If-None-Match when given, so an unchanged record is notModified.

V = Record<string, unknown>

string

RecordOptions & CallOptions & object

Promise<RecordResponse<V>>


records<V>(query?, options?): Promise<RecordsPage<V>>

One page of records.

V = Record<string, unknown>

RecordsQuery

CallOptions

Promise<RecordsPage<V>>


recordsByKeys<V>(keys, expansion?, options?): Promise<BatchResult<V>>

Up to 50 records by key in one round trip, in the order asked; the keys that could not be read are in missing.

V = Record<string, unknown>

readonly string[]

ExpansionOptions

CallOptions

Promise<BatchResult<V>>