from, where, orderBy
The declarative shape: a dataset, a predicate tree of field, operator and value, an ordering and a limit. Values can be placeholders the host binds, so the same document serves many callers.
A declarative query language for Go. You describe what you want as a document; DQL plans it, pushes down what the database can do and finishes the rest in memory. Partition scoping is declared rather than guessed at, because getting it wrong is a data leak.
A query is data, so it can be built, stored, diffed and validated before anything reaches the database.
DQL refuses to guess what partitions your data. A nil scope is an error, because a caller who forgot would otherwise get SQL spanning every tenant.
Parser, planner, generator, processor, pipe operators, executor, expansion and scoping, split so a host can keep the parts it wants.
A query is a document in one of two modes. What the database can do it does, and what it cannot is finished in memory.
The declarative shape: a dataset, a predicate tree of field, operator and value, an ordering and a limit. Values can be placeholders the host binds, so the same document serves many callers.
The same query expressed as a stream: filter, then aggregate with a grouping, then sort and limit. Pipe mode exists because some questions are a sequence and forcing them into a single clause tree makes them unreadable.
The planner decides which clauses the database can answer and emits SQL for those. Computed columns, expression filters and the rest are completed by the processor over the returned rows.
A scope entry marked Required emits its predicate even when a table does not declare the column. ScopeJoins puts the predicate in the ON clause rather than the WHERE, so an out-of-scope row fails the join instead of NULL-padding through a LEFT join.
The querier interface is the shape database/sql already has, so a pooled or instrumented connection satisfies it as it stands.
Computed columns and expression filters evaluate through an interface. DTL satisfies it directly, which is how the two languages end up in the same field of work.
A TextMate grammar under the scope source.dql, and an LSP binary for completion, hover and diagnostics. The server works on a file alone, and a host that knows which datasets and functions exist passes that in for richer completions.
Validates a document in classic or pipe mode.
Decides what pushes down to SQL and what does not.
Emits SQL and its arguments from the plan.
Finishes in memory: computed columns, expression filters, sort.
A declarative query language for Go. You describe what you want as a document; DQL plans it, pushes down what the database can do and finishes the rest in memory. Partition scoping is declared rather than guessed at, because getting it wrong is a data leak.
Shipping something on DQL? Nobody is listed here yet. Tell me what you built and you will be the first.
Get listed →