Expand description
Engine event handler: persists EngineMessage variants to Postgres.
This module contains the core event-to-SQL logic that was previously
embedded in the root crateβs DieselEventHandler. It operates on a
bare &mut PgConnection so callers can wrap calls in their own
transactions.
StructsΒ§
- Expired
Order Cancel - Portable representation of an expired order that needs a synthetic cancel.
- Fill
Side Effect - Journal-only accounting deltas for a single OrderFilled event.
EnumsΒ§
FunctionsΒ§
- apply_
fill_ πledger_ side_ effects - liquidation_
auction_ πfrom_ status - liquidation_
auction_ πupdate_ from_ message - liquidation_
history_ πfrom_ message - new_
liquidation_ πstate_ from_ domain - Convert a domain
LiquidationStateRecordinto the DieselNewLiquidationStateinsertable. - persist_
fill_ with_ side_ effects_ in_ tx - Persist a fill (trade + taker/maker fill rows) and apply ledger side effects in the callerβs transaction.
- persist_
fill_ πwith_ side_ effects_ in_ tx_ with_ validation - persist_
legacy_ replay_ fill_ with_ side_ effects_ in_ tx - Persist a journaled fill while preserving replay compatibility for
pre-cutover WAL payloads that did not carry
underlying_notional. - status_
to_ liquidation_ state_ record - Convert an
AccountLiquidationStatusto aLiquidationStateRecordfor database storage. - validate_
fill_ πunderlying_ notional