Coverage for src/fluree_py/http/protocol/endpoint/transaction.py: 100%
7 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-02 03:03 +0000
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-02 03:03 +0000
1"""Protocols for building and executing transactions in the Fluree ledger."""
3from typing import Protocol, Self
5from fluree_py.http.protocol.mixin import (
6 SupportsCommitable,
7 SupportsContext,
8 SupportsRequestCreation,
9 HasInsertData,
10 SupportsInsert,
11 SupportsWhere,
12)
13from fluree_py.types.common import JsonArray, JsonObject
16class TransactionBuilder(
17 SupportsContext["TransactionBuilder"],
18 SupportsInsert["TransactionReadyToCommit"],
19 SupportsWhere["TransactionBuilder"],
20 Protocol,
21):
22 """Protocol for building transaction operations."""
24 def with_delete(
25 self, data: JsonObject | JsonArray
26 ) -> "TransactionReadyToCommit": ...
29class TransactionReadyToCommit(
30 SupportsRequestCreation,
31 SupportsCommitable,
32 SupportsContext["TransactionReadyToCommit"],
33 SupportsWhere["TransactionReadyToCommit"],
34 HasInsertData,
35 Protocol,
36):
37 """Protocol for transaction operations ready to be committed."""
39 def with_delete(self, data: JsonObject | JsonArray) -> Self: ...