Interface: GenericDatabaseWriterWithTable<DataModel>
server.GenericDatabaseWriterWithTable
An interface to read from and write to the database within Convex mutation functions.
Convex 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 Convex Guide for the guarantees Convex provides your functions.
If you're using code generation, use the DatabaseReader
type in
convex/_generated/server.d.ts
which is typed for your data model.
Type parameters
Name | Type |
---|---|
DataModel | extends GenericDataModel |
Hierarchy
-
GenericDatabaseReaderWithTable
<DataModel
>↳
GenericDatabaseWriterWithTable