Expand description
Transaction data as builder-patterned values.
A TxBuilder assembles the Datomic-dialect transaction forms corium
accepts — map forms with :db/id, and the list ops [:db/add …],
[:db/retract …], [:db/cas …], [:db/retractEntity …] — into a
TxData value ready to submit through a crate::Peer.
use corium_client::tx::{TxBuilder, EntityMap, tempid, lookup};
let tx = TxBuilder::new()
.entity(
EntityMap::with_id(tempid("alice"))
.set("person/name", "Alice")
.set("person/age", 39_i64),
)
.add(lookup("person/email", "bob@example.com"), "person/age", 40_i64)
.build();Structs§
- Entity
Map - A map-form entity:
{:db/id … :attr value …}. Without an id the transactor allocates a fresh entity. - TxBuilder
- Builds a
TxDatavalue from transaction forms. - TxData
- A completed set of transaction forms, ready to submit through a
crate::Peer.