Expand description
QQL executor and Qdrant transport adapters (published as the qql crate).
One executor API over three transports:
source text
→ qql-core: parse + semantic validation
→ prepare: schema USING resolution + embedding inference (qql-embed)
→ qql-plan: plan() → PlannedOperation (transport-neutral IR)
→ batch classification / dispatch
→ REST (rest) | gRPC (grpc) | in-process edge (qql-edge)Backends implement the client::QdrantOps contract (11 methods); the
executor::Executor drives it. DDL flows through the same planner as
DML. The gRPC path converts typed plan structs directly to protobuf —
query vectors, point IDs, DDL request configs, and formula expressions
never take a JSON detour.
§Features
rest(default) — HTTP transport adapter (rest::RestQdrant)grpc(default) — tonic-based gRPC transport (grpc::GrpcQdrant)- With both disabled, custom
client::QdrantOpsimplementations still compile against the executor with no transport dependency.
§Public API re-exports
Types named in this crate’s signatures — QqlError, Stmt,
PlannedOperation, the batch and DDL request types — plus the policy
flow (Parser, inject_filter, ComparisonOp, Value) are
re-exported here, so QdrantOps implementors and policy authors depend on
qql alone. Deeper IR introspection is advanced territory; add
qql-plan / qql-core directly when you need it.
§Errors
Execution failures are structured QqlError values from qql-core with
stable codes (QQL-EXECUTION-*, QQL-TRANSPORT-*, QQL-BACKEND, …).
Re-exports§
pub use executor::PreparedStatement;
Modules§
- backend
- Transport-neutral collection metadata, re-exported from
qql_protocol::schema. - client
- The
QdrantOpsbackend contract plus REST/gRPC client plumbing shared by the transport adapters. - config
- Endpoint, API key, and timeout configuration (
QqlConfig). - embedder
- Remote embedding-server adapter (
HttpEmbedder) implementing theqql-embedEmbeddertrait. Embedding adapters for the runtime. - executor
- The executor: parse → prepare → plan → batch → dispatch.
- grpc
- Tonic channel client and typed protobuf conversions for the gRPC transport.
gRPC transport for Qdrant (
GrpcQdrant). - qdrant
- Typify-generated REST wire types from
openapi.json(build-time output; do not edit). Typify-generated REST types fromopenapi.json. - qdrant_
grpc - Tonic-generated protobuf types from
proto/(build-time output; do not edit). Tonic-generated gRPC types fromproto/. - rest
- REST transport adapter (
RestQdrant) implementingQdrantOpsover JSON HTTP. - snapshots
- Remote shard-snapshot client for edge bootstrap (REST only, not part of
the
QdrantOpscontract). Remote shard-snapshot access for edge bootstrap (REST only). - sparse
- Sparse vector helpers re-exported from
qql-embed(wire-compatible BM25). Re-export shared sparse BM25 fromqql-embed.
Structs§
- Create
Collection Request - Plan IR for
CREATE COLLECTION; projected to the OpenAPI body at the edge. - Create
Index Request - Plan IR for
CREATE INDEX. - Parser
- Canonical QQL parser facade.
- QqlError
- Unified error type for the entire QQL pipeline.
- Query
Batch Request - Wraps multiple
QueryRequests for Qdrant’s/points/query/batchendpoint. All queries must target the same collection. - Quota
Config - Cluster-wide resource quota configuration (
GET/PUT /quotas). - Span
- Source-code span as UTF-8 byte offsets into the query text.
- Update
Batch Request - Wire body for Qdrant’s
POST /collections/{c}/points/batch(mutation batch). Maps to OpenAPIUpdateOperations/ gRPCUpdateBatchPoints. - Update
Collection Request - Plan IR for
ALTER COLLECTION; serializes as the OpenAPI PATCH body.
Enums§
- Comparison
Op - Scalar comparison operator for
field <op> valueandVALUES_COUNTpredicates. - Error
Kind - Broad category of error origin within the QQL pipeline.
- Plan
Facet Value - One facet value as returned by Qdrant: keyword, integer, or bool
(OpenAPI
FacetValue). Serializes untagged. - Plan
Group Id - Group key of a grouped query result (OpenAPI
GroupId): keyword, unsigned integer, or signed integer. Serializes untagged. - Plan
Point Id - Transport-neutral point ID: unsigned integer or string (typically UUID).
- Plan
Shard Key - Transport-neutral custom shard key. Serializes as a JSON string or number
so REST matches OpenAPI
ExtendedPointId-style shard keys. - Plan
Vector Struct - Vector(s) attached to a returned point: one unnamed vector or a named set.
- Plan
Vector Value - Transport-neutral vector value: dense, sparse, or multi-dense rows.
- Planned
Operation - Canonical planned operation. Batch compatibility is determined from this type, not from raw AST.
- Stmt
- Top-level QQL statement parsed from a script.
- Value
- QQL literal value: string, number, bool,
null, object, or list. - Vector
Value - A vector value: dense, sparse, or multivector.
Functions§
- inject_
filter - Injects a typed field comparison into a statement (CTEs and prefetches included), fail-closed.