class ServerApiRoutine
Constructors
🔗
ServerApiRoutine()
The constructor function initializes the #apiContext property with the provided options.
Methods
🔗
run<T>(fn: (routine: this, modules: TApiDefaultContext["modules"]) => T | Promise<T>)
The run
function executes a given function with the current routine and modules as arguments and
returns the result.
🔗
runTx<T>(fn: (routine: this, transaction: EdgeDBTransaction, modules: TApiDefaultContext["modules"]) => Promise<T>, config?: TDatabaseConnectConfig, readonly?): Promise<T>
The runTx
function is a TypeScript function that connects to a database, starts a transaction,
and executes a provided function within that transaction.