auditable
This wrapper intercepts calls through the store interface and implements thread-safe logging of destructive operations (adds / removes) in reverse. This is persisted on the store instance and the reverse operations are executed In order to return the store to the state it was when the transaction began Since the reverse operations are persisted on the store, the store itself acts as a transaction.
Calls to commit or rollback, flush the list of reverse operations This provides thread-safe atomicity and isolation (assuming concurrent operations occur with different store instances), but no durability (transactions are persisted in memory and won’t be available to reverse operations after the system fails): A and I out of ACID.
Classes:
-
AuditableStore–A store that logs destructive operations (add/remove) in reverse order.
Attributes:
AuditableStore
AuditableStore(store: Store)
Bases: Store
A store that logs destructive operations (add/remove) in reverse order.
Methods:
-
__len__– -
add– -
bind– -
close– -
commit– -
contexts– -
destroy– -
namespace– -
namespaces– -
open– -
prefix– -
query– -
remove– -
rollback– -
triples–
Attributes:
-
context_aware– -
formula_aware– -
reverseOps(List[Tuple[Optional[_SubjectType], Optional[_PredicateType], Optional[_ObjectType], Optional[_ContextIdentifierType], str]]) – -
rollbackLock– -
store– -
transaction_aware–
Source code in rdflib/plugins/stores/auditable.py
reverseOps
instance-attribute
reverseOps: List[Tuple[Optional[_SubjectType], Optional[_PredicateType], Optional[_ObjectType], Optional[_ContextIdentifierType], str]] = []
__len__
add
Source code in rdflib/plugins/stores/auditable.py
bind
bind(prefix: str, namespace: URIRef, override: bool = True) -> None
close
commit
contexts
destroy
namespace
namespace(prefix: str) -> Optional[URIRef]
namespaces
namespaces() -> Iterator[Tuple[str, URIRef]]
open
prefix
prefix(namespace: URIRef) -> Optional[str]
query
query(*args: Any, **kw: Any) -> Result
remove
Source code in rdflib/plugins/stores/auditable.py
rollback
Source code in rdflib/plugins/stores/auditable.py
triples
triples(triple: _TriplePatternType, context: Optional[_ContextType] = None) -> Iterator[Tuple[_TripleType, Iterator[Optional[_ContextType]]]]