transact
¤
Classes:
-
TransactionBuilderImpl
–Implementation of a transaction operation builder.
-
TransactionReadyToCommitImpl
–Implementation of a transaction operation ready to be committed.
TransactionBuilderImpl
dataclass
¤
TransactionBuilderImpl(
*,
endpoint: str,
ledger: str,
context: dict[str, Any] | None = None,
where: WhereClause | None = None,
data: JsonObject | JsonArray | None = None,
delete_data: JsonObject | JsonArray | None = None,
)
Bases: WithContextMixin['TransactionBuilderImpl']
, WithInsertMixin['TransactionReadyToCommitImpl']
, WithWhereMixin['TransactionBuilderImpl']
, TransactionBuilder
Implementation of a transaction operation builder.
Methods:
-
with_delete
–Add delete operation to the transaction.
with_delete
¤
with_delete(data: JsonObject | JsonArray) -> TransactionReadyToCommitImpl
Add delete operation to the transaction.
TransactionReadyToCommitImpl
dataclass
¤
TransactionReadyToCommitImpl(
*,
endpoint: str,
ledger: str,
context: dict[str, Any] | None,
where: WhereClause | None,
data: JsonObject | JsonArray | None,
delete_data: JsonObject | JsonArray | None,
)
Bases: RequestMixin
, WithContextMixin['TransactionReadyToCommitImpl']
, WithWhereMixin['TransactionReadyToCommitImpl']
, CommitableMixin['TransactionReadyToCommitImpl']
, TransactionReadyToCommit
Implementation of a transaction operation ready to be committed.
Methods:
-
acommit
–Executes the transaction asynchronously.
-
build_request_payload
–Build the request payload for the transaction operation.
-
commit
–Executes the transaction synchronously.
-
get_url
–Get the endpoint URL for the transaction operation.
-
with_delete
–Add delete operation to the transaction.
acommit
async
¤
acommit() -> FlureeResponse
Executes the transaction asynchronously.
Raises:
-
RequestError
–If the HTTP request fails.
-
TypeError
–If the type parameter cannot be resolved.
build_request_payload
¤
Build the request payload for the transaction operation.
commit
¤
commit() -> FlureeResponse
Executes the transaction synchronously.
Raises:
-
RequestError
–If the HTTP request fails.
-
TypeError
–If the type parameter cannot be resolved.
with_delete
¤
with_delete(data: JsonObject | JsonArray) -> TransactionReadyToCommitImpl
Add delete operation to the transaction.