Skip to main content
server.GenericDatabaseWriterWithTable An interface to read from and write to the database within Bijection mutation functions. You should generally use the DatabaseWriter type from "./_generated/server". Bijection guarantees that all writes within a single mutation are executed atomically, so you never have to worry about partial writes leaving your data in an inconsistent state. See the Bijection Guide for the guarantees Bijection provides your functions.

Type parameters

Hierarchy

Properties

system

• system: BaseDatabaseReaderWithTable<SystemDataModel> An interface to read from the system tables within Bijection query functions The two entry points are:
  • get, which fetches a single document by its GenericId.
  • query, which starts building a query.

Inherited from

GenericDatabaseReaderWithTable.system

Methods

table

▸ table<TableName>(tableName): DataModel[TableName] extends { isWritable: false } ? BaseTableReader<DataModel, TableName> : BaseTableWriter<DataModel, TableName> Scope the database to a specific table.

Type parameters

Parameters

Returns

DataModel[TableName] extends { isWritable: false } ? BaseTableReader<DataModel, TableName> : BaseTableWriter<DataModel, TableName>

Overrides

GenericDatabaseReaderWithTable.table