Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

QueueStrategy.md

93 lines1.9 KB

Defined in: packages/db/src/strategies/types.ts:66

Queue strategy that processes all executions in order FIFO: { addItemsTo: 'back', getItemsFrom: 'front' } LIFO: { addItemsTo: 'back', getItemsFrom: 'back' }

Extends

Properties

_type

_type: "queue";

Defined in: packages/db/src/strategies/types.ts:8

Type discriminator for strategy identification

Inherited from

BaseStrategy._type


cleanup()

cleanup: () => void;

Defined in: packages/db/src/strategies/types.ts:23

Clean up any resources held by the strategy Should be called when the strategy is no longer needed

Returns

void

Inherited from

BaseStrategy.cleanup


execute()

execute: <T>(fn) => boolean | void | Promise<void>;

Defined in: packages/db/src/strategies/types.ts:69

Explicit false rejects the transaction; void preserves custom strategies.

Type Parameters

T

T extends object = Record<string, unknown>

Parameters

fn

() => Transaction<T>

Returns

boolean | void | Promise<void>

Overrides

BaseStrategy.execute


options?

optional options: QueueStrategyOptions;

Defined in: packages/db/src/strategies/types.ts:67