Class: TxBuilder

TxBuilder()

new TxBuilder()

A transaction builder.
Deprecated:
  • Use EDN template strings instead.
Source:

Methods

add(e, a, v) → {TxBuilder}

Add a fact to the transaction.
Parameters:
Name Type Description
e String | Number | shared.BigInt | Array The entity.
a String The attribute.
v * The value.
Source:
Returns:
This instance.
Type
TxBuilder

build() → {Array}

Build the transaction.
Source:
Returns:
The transaction data.
Type
Array

cas(e, a, expVal, newVal) → {TxBuilder}

Add a compare-and-set operation.
Parameters:
Name Type Description
e String | Number | shared.BigInt | Array The entity.
a String The attribute.
expVal * The expected value (to swap out).
newVal * The new value (to swap in).
Source:
Returns:
This instance.
Type
TxBuilder

retract(e, a, v) → {TxBuilder}

Retract a fact from the transaction.
Parameters:
Name Type Description
e String | Number | shared.BigInt | Array The entity.
a String The attribute.
v * The value.
Source:
Returns:
This instance.
Type
TxBuilder

retractEntity(e) → {TxBuilder}

Retract an entity.
Parameters:
Name Type Description
e String | Number | shared.BigInt | Array The entity.
Source:
Returns:
This instance.
Type
TxBuilder

txData(objs) → {TxBuilder}

Append map transaction data to this transaction.
Parameters:
Name Type Description
objs Objects that contain the transaction data.
Source:
Returns:
This instance.
Type
TxBuilder

txFunction(functionName, args) → {TxBuilder}

Add an arbitrary transaction function call. Note that if you intend to pass symbols or keywords to your transaction function, you must convert those arguments to that type before you pass those arguments to this function.
Parameters:
Name Type Description
functionName String The function name.
args * The arguments.
Source:
Returns:
This instance.
Type
TxBuilder