Skip to main content

@idpass/data-collect-core / DrizzleQueryExecutor

Type Alias: DrizzleQueryExecutor

DrizzleQueryExecutor = object

Defined in: interfaces/types.ts:575

Shared abstraction over Drizzle's database and transaction objects.

Both the full database connection and transaction objects expose an execute method for running raw SQL and a transaction method for nesting transactions. Typing adapter methods against this interface lets them accept either a full DB or a transaction handle, which is required for callers that need to coordinate writes across multiple adapters inside a single transaction.

Properties

execute()

execute: (query) => Promise<unknown>

Defined in: interfaces/types.ts:576

Parameters

query

unknown

Returns

Promise<unknown>


transaction()

transaction: <T>(fn) => Promise<T>

Defined in: interfaces/types.ts:577

Type Parameters

T

T

Parameters

fn

(tx) => Promise<T>

Returns

Promise<T>