Type parameters
Hierarchy
-
BaseTableReader<DataModel,TableName> ↳BaseTableWriter
Methods
get
▸ get<Fields>(id, options): Promise<null | SelectedDocument<DocumentByName<DataModel, TableName>, Fields>>
Read selected top-level properties, retaining identity and creation time.
Type parameters
Parameters
Returns
Promise<null | SelectedDocument<DocumentByName<DataModel, TableName>, Fields>>
Inherited from
BaseTableReader.get ▸ get(id): Promise<null | DocumentByName<DataModel, TableName>>
Fetch a single document from the table by its GenericId.
Parameters
Returns
Promise<null | DocumentByName<DataModel, TableName>>
- The GenericDocument of the document at the given GenericId, or
nullif it no longer exists.
Inherited from
BaseTableReader.getquery
▸ query():SelectableQueryInitializer<NamedTableInfo<DataModel, TableName>>
Begin a query for the table.
Queries don’t execute immediately, so calling this method and extending its
query are free until the results are actually used.
Returns
SelectableQueryInitializer<NamedTableInfo<DataModel, TableName>>
- A QueryInitializer object to start building a query.
Inherited from
BaseTableReader.queryinsert
▸ insert(value): Promise<GenericId<TableName>>
Insert a new document into the table.
Parameters
Returns
Promise<GenericId<TableName>>
- GenericId of the new document.
patch
▸ patch(id, value): Promise<void>
Patch an existing document, shallow merging it with the given partial
document.
New fields are added. Existing fields are overwritten. Fields set to
undefined are removed.
Parameters
Returns
Promise<void>
replace
▸ replace(id, value): Promise<void>
Replace the value of an existing document, overwriting its old value.
Parameters
Returns
Promise<void>
delete
▸ delete(id): Promise<void>
Delete an existing document.
Parameters
Returns
Promise<void>