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

Function getActiveTransaction

packages/db/src/transactions.ts:176–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174 * }
175 */
176export function getActiveTransaction(): Transaction | undefined {
177 if (transactionStack.length > 0) {
178 return transactionStack.slice(-1)[0]
179 } else {
180 return undefined
181 }
182}
183
184function registerTransaction(tx: Transaction<any>) {
185 // Clear any stale work that may have been left behind if a previous mutate

Callers 4

updateMethod · 0.90
scheduleGraphRunMethod · 0.85
scheduleGraphRunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected