blobhub.types.orientdb.Graph is the typed module for blobhub.graph.orientdb blobs. Each revision of such a blob
is its own OrientDB database, and Graph runs one OrientDB SQL statement at a time against it. That is the
module’s whole surface.
Graph(revision) raises TypeMismatch when the revision’s blob is not a graph blob.
Execute
graph.execute(statement, params=None, *, write=False) runs one statement and returns a GraphResult with two
lists, vertices and edges. Each item is an OrientDB record as a dict, carrying its @rid and @class.
- A read refuses anything else. A statement that is not one
SELECT,TRAVERSEorMATCHraisesCommandErrorwitherrormutating_command_in_query_mode, before it reaches OrientDB. The message adds thatwrite=Truesends it through the command channel. - A write needs a draft. A committed revision raises
Conflictwitherrorrevision_not_writable. paramsfills placeholders: adictfor named ones (:name), alistfor positional ones (?).- A statement returns at most 50 records, with OrientDB’s fetch plan
*:1. UseSKIPandLIMITin the statement to page through more. - An empty statement raises
ValueErrorbefore any request.
Errors
When OrientDB refuses a statement, the message readsOrientDB refused the statement: <reason>, and the full detail
is in error.details.
A read is retried after a server error or a network failure; a write is retried only when it never reached the
platform, so a
CREATE VERTEX that timed out is never sent twice. It may still have run once: check before you
repeat it. See Errors and retries.
See also
- Blob Types → Graph — the graph blob type.
- Blobs and revisions — drafts, commits and the data channel.

