Skip to main content

Module transaction

Module transaction 

Source
Expand description

Provider-neutral transaction port for transacted { datasource } blocks.

This module is the camel-api half of the sql-transactions capability: it defines the object-safe TransactionManager / TransactionSession surface, the TransactionState lifecycle machine, the TransactionOutcome finalization result, and the typed TransactionError family. The port is implemented by the sql component (slice 2) and resolved by datasource name from a camel-core registry; camel-api carries no driver or SQL value model.

The surface is deliberately final for slice 2: lazy begin, the rollback-only flag, finalization outcomes, and #[non_exhaustive] error/outcome types are all present here, so adding execution and registry wiring needs no signature change. Sessions are 'static trait objects so the implementing crate can downcast to its concrete session for statement execution.

The join submodule carries the runtime join channels (a task_local! block-session cell and the baked join scope) that bind a joined sql step to the block session it must run inside.

Modules§

join
Runtime join channels that bind a joined sql step to its block session.

Enums§

TransactionError
Typed transaction failures for load-time validation and runtime finalization.
TransactionOutcome
Result of finalizing a TransactionSession.
TransactionState
Lifecycle state of a TransactionSession.

Traits§

TransactionManager
Provider-neutral factory for transaction sessions on one datasource.
TransactionSession
One block-owned transaction on one datasource.

Type Aliases§

BeginFuture
Boxed future for the lazy BEGIN of a TransactionSession.
FinalizeFuture
Boxed future for finalizing a TransactionSession.
OpenSessionFuture
Boxed future resolving to a new TransactionSession.