The host bindings follow the same conceptual surface while respecting host naming and object ownership.
| Capability | Rust | Python | Node.js | WASM |
|---|---|---|---|---|
| Parse script | Parser::parse_all | parse | parse | parse |
| Validate | Parser::parse(_).is_ok() | is_valid | isValid | isValid |
| Tokenize | lexer API | tokenize | tokenize | tokenize |
| Inject policy | inject_filter | inject_filter | injectFilter | inject_filter / Stmt.injectFilter |
| Explain | planner/runtime | explain | explain | explain / analyze |
| Compile | planner/runtime | compile_query | compileQuery | compile |
| Execute | Executor::execute | Client.execute | Client.execute | Client.execute |
Three input axes
Section titled “Three input axes”- One statement: the strict single-statement parser.
- One script: semicolon-delimited source parsed as one ordered unit.
- Host batch: an array of independent statements or scripts.
These are not interchangeable APIs. In particular, an array boundary is owned by the host, while semicolon ordering is part of QQL source.
Statement ownership
Section titled “Statement ownership”Python, Node.js, and WASM expose statement handles so a host can parse once, inject policy, set optional shard routing, inspect the AST, and execute the same object. WASM owners must call free() explicitly when they are finished. In addition to toObject/toJSON, the WASM Stmt exposes compileRoute and compileRouteBytes to inspect the compiled REST route of a single owned statement.
Token objects are nearly identical across hosts but differ slightly in shape: the Rust lexer emits { kind, text, span }, the Python and Node bindings emit { kind, text, pos }, and WASM additionally includes end and len.
Execution reports
Section titled “Execution reports”Execution returns a stable report with aggregate ok, ordered per-operation results, and succeeded/failed counts. on_error / onError selects stop or continue behavior for multi-operation inputs. The WASM Client is REST-only: it compiles to and executes Qdrant REST routes and does not open gRPC connections.