type_bridge.query.parser¶
parser
¶
Parser for converting TypeQL strings back to AST nodes.
Uses the Rust type_bridge_core.parse_typeql_query function, then converts
the serde-tagged dicts into the Python AST dataclasses defined in
type_bridge.query.ast.
parse_typeql_query
¶
Parse a TypeQL query string into a list of Clause AST nodes.
Uses the Rust type_bridge_core parser for performance and correctness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
str
|
A TypeQL data-manipulation query string. |
required |
Returns:
| Type | Description |
|---|---|
list[Clause]
|
List of Clause AST nodes (MatchClause, InsertClause, etc.) |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the query cannot be parsed. |
NotImplementedError
|
If the Rust extension is not available. |