graflo.db.tigergraph.gsql_parsers¶
Pure parsers for TigerGraph GSQL and REST catalog output.
GsqlAttribute
dataclass
¶
One attribute of a GSQL vertex or edge type.
Source code in graflo/db/tigergraph/gsql_parsers.py
GsqlEdgeDdl
dataclass
¶
A recovered CREATE ... EDGE declaration.
endpoints holds every FROM x, TO y pair, since a single GSQL edge
type may declare several separated by |.
Source code in graflo/db/tigergraph/gsql_parsers.py
GsqlVertexDdl
dataclass
¶
gsql_result_has_error(result)
¶
Return True when a GSQL response text signals a semantic/runtime failure.
Source code in graflo/db/tigergraph/gsql_parsers.py
is_missing_query_endpoint_error(result)
¶
Return True when REST++ reports an installed query endpoint is missing.
Source code in graflo/db/tigergraph/gsql_parsers.py
is_not_found_error(error)
¶
Return True if the error indicates that an object doesn't exist.
parse_installed_queries_from_ls(result_str)
¶
Parse ls output lines like - my_query() (installed v2).
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_installed_queries_from_rest_endpoints(result, graph_name)
¶
Extract installed query names from GET /endpoints/{graph}?dynamic=true.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_installed_queries_from_show_query(result_str)
¶
Parse SHOW QUERY * output, keeping only blocks marked # installed.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_restpp_response(response, is_edge=False)
¶
Parse REST++ API response into list of documents.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_edge_ddl(result_str)
¶
Recover full EDGE declarations from SHOW EDGE * output.
The UNDIRECTED keyword is the point: it is the only place any backend
states an edge is undirected, so it is the only place Edge.directed
can be recovered rather than assumed.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_edge_output(result_str)
¶
Parse SHOW EDGE * output to extract edge type names and direction.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_edge_output_with_vertices(output)
¶
Parse SHOW EDGE * output (compact TigerGraph format).
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_graph_output(result_str)
¶
Parse SHOW GRAPH * output to extract graph names.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_job_output(result_str)
¶
parse_show_output(result_str, prefix)
¶
Parse SHOW * output to extract type names.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_vertex_ddl(result_str)
¶
Recover full VERTEX declarations from SHOW VERTEX * output.
Source code in graflo/db/tigergraph/gsql_parsers.py
parse_show_vertex_output(result_str)
¶
split_ddl_terms(body)
¶
Split a DDL parameter list on top-level commas and pipes.
Depth-aware because a compound type spells its arguments with commas of its
own -- MAP<INT, STRING> is one term, not two. | separates the endpoint
clauses of a multi-endpoint edge (FROM a, TO b | FROM c, TO d) and is
treated the same way, so every pair is recovered rather than just the first.