graflo.db.nebula.util¶
NebulaGraph utility functions.
Type mapping, filter rendering, value escaping, and schema-propagation helpers.
escape_nebula_string(value)
¶
make_vid(doc, match_keys)
¶
Derive a VID string from a document's match-key values.
When a single match key is used the raw value is taken. When multiple keys
are present the values are joined with :: so the VID is deterministic
and unique for the combination.
Source code in graflo/db/nebula/util.py
nebula_type(ft)
¶
Map a graflo FieldType to the corresponding NebulaGraph type name.
render_filters_cypher(filters, doc_name)
¶
Render a FilterExpression as a Cypher WHERE clause (without the keyword).
Source code in graflo/db/nebula/util.py
render_filters_ngql(filters, doc_name)
¶
Render a FilterExpression as an nGQL WHERE clause (without the keyword).
Source code in graflo/db/nebula/util.py
serialize_nebula_value(value)
¶
Serialise a Python value into an nGQL literal string.
Source code in graflo/db/nebula/util.py
wait_for_schema_propagation(adapter, check_statement, *, max_retries=30, interval=1.0)
¶
Poll check_statement until it succeeds or retries are exhausted.
NebulaGraph propagates schema changes asynchronously across the cluster.
After CREATE SPACE / CREATE TAG / CREATE EDGE, subsequent
statements may fail until propagation completes (typically within two
heartbeat cycles, ~20 s for default settings).
Source code in graflo/db/nebula/util.py
wait_for_space_ready(adapter, space_name, *, max_retries=30, interval=1.0)
¶
Wait until `USEspace_name``` succeeds.