Expand description
QQL language frontend: lexer, parser, typed AST, explain, and formatting.
qql-core is the single owner of the QQL language surface. It performs no
I/O: no networking, no file access, and no knowledge of Qdrant REST JSON or
gRPC protobuf shapes. Lowering to transports lives in qql-plan
(transport-neutral plans plus an optional REST projection) and the executor
crate qql (REST / gRPC / edge execution).
With default features the crate builds without third-party dependencies;
serde and json are opt-in for AST serialization and dynamic-value
conversion. Parser-only consumers — formatters, linters, language servers,
code generators — therefore embed it cheaply.
§Entry points
parser::Parser— source text → typedStmtAST with strict validation (Parser::parse_allfor multi-statement scripts)ast::inject_filter— inject a typed comparison into an existing ASTexplain— tree-formatted statement dumps for humansfmt— canonical formatter; output re-parses to an identical ASTparams—:name/?placeholder binding and substitution
§Errors
Every failure is a structured error::QqlError carrying a stable code,
an explicit ErrorKind, and a byte-offset
Span.
Modules§
- ast
- Typed abstract syntax tree: statements, filter and formula expressions, values, and AST transforms.
- error
- Structured errors: stable codes, explicit
ErrorKind, byte-offset spans. - explain
- Tree-formatted statement explanations. Human-readable query plan inspection.
- fmt
- Canonical QQL formatter with parse → format → parse round-trip guarantees. Canonical QQL formatter.
- lexer
- Byte-offset lexer: source text →
Tokenstream. - params
- Parameter binding for
:name/?placeholders with type-checked substitution. Parameter binding and prepared query substitution. - parser
- Recursive-descent parser: token stream → validated typed AST.
- token
- Lexical token kinds, spans, and keyword lookup tables.