Skip to main content

Interface: BaseTableReader<DataModel, TableName>

server.BaseTableReader

Type parameters

NameType
DataModelextends GenericDataModel
TableNameextends TableNamesInDataModel<DataModel>

Hierarchy

Methods

get

get(id): Promise<null | DocumentByName<DataModel, TableName>>

Fetch a single document from the table by its GenericId.

Parameters

NameTypeDescription
idGenericId<TableName>The GenericId of the document to fetch from the database.

Returns

Promise<null | DocumentByName<DataModel, TableName>>

Defined in

server/database.ts:76


query

query(): QueryInitializer<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

QueryInitializer<NamedTableInfo<DataModel, TableName>>

Defined in

server/database.ts:88