graflo.db.nebula.adapter¶
Version-specific client adapters for NebulaGraph.
Provides a uniform execute / close / use_space interface over
nebula3-python (v3.x, Thrift) and nebula5-python (v5.x, gRPC).
Attributes¶
logger = logging.getLogger(__name__)
module-attribute
¶
Classes¶
NebulaClientAdapter
¶
Bases: ABC
Abstract adapter that hides driver differences.
Source code in graflo/db/nebula/adapter.py
NebulaResultSet
¶
Thin wrapper around driver-specific result objects.
Normalises access so that NebulaConnection never has to know which
driver is in use.
Source code in graflo/db/nebula/adapter.py
Attributes¶
raw
property
¶
Methods:¶
__init__(raw, *, is_v3=True)
¶
column_values(col)
¶
error_msg()
¶
is_succeeded()
¶
Whether the statement succeeded.
The two drivers report failure differently: v3 returns a status on the
result, while v5 raises from :meth:ResultSet.raise_on_error, which
:meth:NebulaV5Adapter.execute calls before wrapping. So a v5 result
that reaches here has already been checked -- True is a fact about
an error-free path, not an assumption that nothing failed.
Source code in graflo/db/nebula/adapter.py
rows_as_dicts()
¶
Return all rows as list of primitive-type dicts.
Source code in graflo/db/nebula/adapter.py
NebulaV3Adapter
¶
Bases: NebulaClientAdapter
Adapter for nebula3-python (NebulaGraph 3.x, Thrift).
Source code in graflo/db/nebula/adapter.py
Methods:¶
__init__()
¶
close()
¶
connect(config)
¶
Source code in graflo/db/nebula/adapter.py
execute(statement)
¶
Source code in graflo/db/nebula/adapter.py
NebulaV5Adapter
¶
Bases: NebulaClientAdapter
Adapter for nebula5-python (NebulaGraph 5.x, gRPC / ISO GQL).
.. warning::
Experimental and unverified. NebulaGraph 5.x ships no open-source
server image, so this path is exercised by no test and no CI job. Most
statement builders in :mod:graflo.db.nebula.query still emit nGQL
rather than GQL, so DDL, writes and introspection are expected to fail
here. Treat 5.x as unsupported until it can be run against a real
instance; 3.x is the validated target.