MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / __init__

Method __init__

sdk-python/src/graphlite_sdk/transaction.py:52–66  ·  view source on GitHub ↗

Internal constructor - use session.transaction() instead Begin a new transaction

(self, session: 'Session')

Source from the content-addressed store, hash-verified

50 """
51
52 def __init__(self, session: 'Session'):
53 """
54 Internal constructor - use session.transaction() instead
55
56 Begin a new transaction
57 """
58 self._session = session
59 self._committed = False
60 self._rolled_back = False
61
62 # Execute BEGIN TRANSACTION
63 try:
64 self._session._db.execute(self._session._session_id, "BEGIN TRANSACTION")
65 except Exception as e:
66 raise TransactionError(f"Failed to begin transaction: {e}")
67
68 def execute(self, statement: str) -> None:
69 """

Callers

nothing calls this directly

Calls 2

TransactionErrorClass · 0.85
executeMethod · 0.45

Tested by

no test coverage detected