XRAPH/Work/Query language
Go · since 2026

DQL

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.

Language
Go
Category
Query language
Since
2026
Stars
0
Repository Docs
01

Highlights

3 claims
H.01
Adocument
Not a string to parse

A query is data, so it can be built, stored, diffed and validated before anything reaches the database.

H.02
Declared
Partition scoping

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.

H.03
Ninepackages
Each replaceable

Parser, planner, generator, processor, pipe operators, executor, expansion and scoping, split so a host can keep the parts it wants.

02

The language

7 entries
Query specification

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.

02.1
Classic mode

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.

Placeholders
02.2
Pipe mode

An ordered chain of operators

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.

Operators
02.3
Planning

Pushed down, or finished in memory

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.

Two-stage
02.4
Scoping

Required, and joined

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.

Multi-tenant
02.5
Databases

Whatever you already have

The querier interface is the shape database/sql already has, so a pooled or instrumented connection satisfies it as it stands.

database/sql
02.6
Expressions

The expression language is yours

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.

Pluggable
DTL
02.7
Editors

A grammar and a server

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.

TextMateLSP
Editor support
The query reference
03

Anatomy

4 modules
01

Parser

Validates a document in classic or pipe mode.

02

Planner

Decides what pushes down to SQL and what does not.

03

Generator

Emits SQL and its arguments from the plan.

04

Processor

Finishes in memory: computed columns, expression filters, sort.

04

Why it exists

Design notes

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.

05

Signals

GitHub
Stars
0
Language
Go
Since
2026
Adopters
00

Shipping something on DQL? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed
06

Where it sits

Fields · papers