Skip to Content
API referencePulsar CoreSrcComponentsselectTXByKey()

@tuwaio/pulsar-core-monorepo


selectTXByKey()

selectTXByKey<TR, T>(transactionsPool, key): undefined | T

Defined in: packages/pulsar-core/src/store/transactionsSelectors.ts:42 

Selects a single transaction from the pool by its unique transaction key (txKey). This is the most direct way to retrieve a transaction.

Type Parameters

TR

TR

The type of the tracker identifier.

T

T extends Transaction<TR>

The transaction type.

Parameters

transactionsPool

TransactionPool<TR, T>

The entire pool of transactions from the store.

key

string

The txKey of the transaction to retrieve.

Returns

undefined | T

The transaction object if found, otherwise undefined.

Last updated on