MCPcopy Index your code
hub / github.com/TanStack/db / createTransaction

Function createTransaction

packages/db/src/transactions.ts:157–163  ·  view source on GitHub ↗
(
  config: TransactionConfig<T>,
)

Source from the content-addressed store, hash-verified

155 * await tx.commit()
156 */
157export function createTransaction<T extends object = Record<string, unknown>>(
158 config: TransactionConfig<T>,
159): Transaction<T> {
160 const newTransaction = new Transaction<T>(config)
161 transactions.push(newTransaction)
162 return newTransaction
163}
164
165/**
166 * Gets the currently active ambient transaction, if any

Callers 15

persisted.test.tsFile · 0.90
powersync.test.tsFile · 0.90
createOptimisticActionFunction · 0.90
mutateFunction · 0.90
updateMethod · 0.90
local-only.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected