本页还没有译文
本页 37 段还没译成Русский,下面显示的是英文原文。QueueStrategy
还没翻译译自英文(tanstack.com)本页 37 段都还没译
Defined in: packages/db/src/strategies/types.ts:73
Queue strategy that processes all executions in order FIFO: { addItemsTo: 'back', getItemsFrom: 'front' } LIFO: { addItemsTo: 'back', getItemsFrom: 'back' }
Extends
BaseStrategy<"queue">
Properties
_type
_type: "queue";Defined in: packages/db/src/strategies/types.ts:8
Type discriminator for strategy identification
Inherited from
cleanup()
cleanup: () => void;Defined in: packages/db/src/strategies/types.ts:30
Clean up any resources held by the strategy Should be called when the strategy is no longer needed
Returns
void
Inherited from
execute()
execute: <T>(fn, onAdmit?, onCommit?) => boolean | void | Promise<void>;Defined in: packages/db/src/strategies/types.ts:76
Explicit false rejects the transaction; void preserves custom strategies.
Type Parameters
T
T extends object = Record<string, unknown>
Parameters
fn
() => Transaction<T>
onAdmit?
() => void | Transaction<T>
onCommit?
() => Promise<unknown> | undefined
Returns
boolean | void | Promise<void>
Overrides
options?
optional options: QueueStrategyOptions;Defined in: packages/db/src/strategies/types.ts:74