Query playground
This page shows the SQL Quark emits. You describe a query with the form — model, columns, filters, order, limit — and the page prints the statement each of the six dialects would receive, the arguments bound to its placeholders, and the Go chain that produces it.
What it is not: it runs nothing. There is no database behind the page; Quark is compiled to WebAssembly and pointed at a driver that records the statement and answers an empty result. The SQL is what the Quark version this site is pinned to emits today; it is not a promise about the next version.
A rendered example
This is what the form shows before you touch it. The chain is the Go you would write; the table is the statement each dialect receives. The text here is generated from the same code the live builder runs, and a test fails when the two drift apart.
quark.For[User](ctx, client).
Select("id", "email", "country").
Where("country", "=", "ES").
Where("created_at", ">=", time.Date(2026, time.January, 1, 0, 0, 0, 0, time.UTC)).
OrderBy("created_at", "DESC").
Limit(10).
Offset(20).
List()
| Dialect | SQL |
|---|---|
| PostgreSQL | SELECT "id", "email", "country" FROM "users" WHERE "deleted_at" IS NULL AND ("country" = $1 AND "created_at" >= $2) ORDER BY "created_at" DESC LIMIT 10 OFFSET 20 |
| MySQL | SELECT `id`, `email`, `country` FROM `users` WHERE `deleted_at` IS NULL AND (`country` = ? AND `created_at` >= ?) ORDER BY `created_at` DESC LIMIT 20, 10 |
| MariaDB | SELECT `id`, `email`, `country` FROM `users` WHERE `deleted_at` IS NULL AND (`country` = ? AND `created_at` >= ?) ORDER BY `created_at` DESC LIMIT 10 OFFSET 20 |
| SQLite | SELECT "id", "email", "country" FROM "users" WHERE "deleted_at" IS NULL AND ("country" = ? AND "created_at" >= ?) ORDER BY "created_at" DESC LIMIT 10 OFFSET 20 |
| SQL Server | SELECT [id], [email], [country] FROM [users] WHERE [deleted_at] IS NULL AND ([country] = @p1 AND [created_at] >= @p2) ORDER BY [created_at] DESC OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY |
| Oracle | SELECT "ID", "EMAIL", "COUNTRY" FROM "USERS" WHERE "DELETED_AT" IS NULL AND ("COUNTRY" = :1 AND "CREATED_AT" >= :2) ORDER BY "CREATED_AT" DESC OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY |
Arguments bound, in placeholder order: "ES", "2026-01-01T00:00:00Z".
Three things to read in it. The soft-delete predicate deleted_at IS NULL
is there because the User model has a deleted_at column, not because the
form asked for it. MySQL writes the offset first (LIMIT 20, 10) while
MariaDB, which shares its quoting, writes LIMIT 10 OFFSET 20. SQL Server and
Oracle have no LIMIT: Quark emits OFFSET … ROWS FETCH NEXT … ROWS ONLY,
and when the query has no ORDER BY of its own it adds one over the primary
key, because those engines require an order for that clause to be valid.
The live builder
The builder is Quark itself, compiled to WebAssembly. It is not loaded with the page: the button below fetches it, and the size on the button is measured in CI on every change — the build fails if the module grows past its budget or if this page states a size more than 10 % away from the real one.
The live builder needs JavaScript; the rendered example above does not.
Presets
The form covers the filtering family of the query bench. The presets cover
the families the form cannot express with its fields, one fixed query each:
a join, a grouped aggregate with HAVING, a Count(), a correlated EXISTS
subquery, a window function, a UNION, and a read through a common table
expression. Pick one from the first select of the form; the Go text shows
how the fluent API spells it.