Skip to content

sqlocal / index / Transaction

Type Alias: Transaction ​

ts
type Transaction = {
  batch: <Result>(passStatements) => Promise<Result[][]>;
  commit: () => Promise<void>;
  lastAffectedRows?: bigint;
  query: <Result>(passStatement) => Promise<Result[]>;
  rollback: () => Promise<void>;
  sql: <Result>(queryTemplate, ...params) => Promise<Result[]>;
  transactionKey: QueryKey;
};

Defined in: src/types.ts:40

Properties ​

PropertyTypeDefined in
batch<Result>(passStatements) => Promise<Result[][]>src/types.ts:50
commit() => Promise<void>src/types.ts:53
lastAffectedRows?bigintsrc/types.ts:42
query<Result>(passStatement) => Promise<Result[]>src/types.ts:43
rollback() => Promise<void>src/types.ts:54
sql<Result>(queryTemplate, ...params) => Promise<Result[]>src/types.ts:46
transactionKeyQueryKeysrc/types.ts:41

Released under the MIT License