See the query change before it surprises you

An invoice-reminder query has survived a schema rename in a part of the product that is not exercised every day. The current schema calls the column collection_status; the query still asks for payment_status:

const invoices = table("invoices", {
  id: "uuid", tenant_id: "uuid", due_on: "date",
  collection_status: "text", balance_cents: "int8",
});

const overdueInvoices = invoices
  .where(
    col(invoices, "payment_status", "text") // renamed column
      .eq(lit("overdue", "text")),
  )
  .select({
    id: col(invoices, "id", "uuid"),
    balanceCents: col(invoices, "balance_cents", "int8"),
  });

With a discovered schema, DBQC marks that reference in VS Code:

Column "payment_status" not found in table "invoices"

Correct the one reference, compile the DBQC definition, and DBQC emits ordinary SQL, ordered parameters, and a result schema. Review or test that output, then run it through the driver, pool, and transaction handling already in the application. No database connection changes hands.

This is the DBQC value in a small, real maintenance moment. Follow the complete query-change walkthrough or [run the same kind of pilot on your own query](/pilot/).

The product, in one minute

DBQC is a database query compiler for application teams that already care about their query code. It brings one feedback loop to relational logic across Python, TypeScript, Java, Rust, Scala, and JSON: start with discovered table and column definitions, write a typed, composable DBQC query definition, validate and compile it, then receive ordinary SQL, ordered parameters, and a result schema for the database you target.

You keep using your existing database driver to execute the generated SQL. DBQC does not sit in the execution path, replace your database, or act as an ORM.

Tangled, duplicated query paths contrasted with a clear composable query graph that produces reviewable SQL.

Find your story

type-aware SQL construction and want the same composability, readable SQL, and review discipline in every language you use. Start with composable application query logic.

database, adding an embedded deployment, or moving from a legacy engine. Keep the query definition and change the compiler target. Start with database portability.

validation, and auditable SQL across a large organization. This is a later, enterprise-scale DBQC story. See large query estates.

Read the full audience guide for the problem, proof, and starting point for each story.

From definition to dependable delivery

  1. Work in your editor. Use discovered schema context while defining the

query, then invoke the DBQC compiler for diagnostics and a preview of the emitted SQL. See VS Code Integration.

  1. Validate and test it. DBQC checks the full query structure, types, and

target dialect before the statement reaches a database. Keep generated SQL as a fixture, run the checks in CI, or compare a refactor with its prior behavior.

  1. Run it with your stack. Pass the SQL and ordered parameters to the

driver, connection pool, transaction boundary, and result handling you already use.

The story

  1. Define a query once. Model tables, filters, joins, writes, and result

shapes as structured query components with explicit relational meaning.

  1. Compose it safely. Reuse a fragment anywhere it is needed; DBQC resolves

dependencies, validates schemas and types, and produces diagnostics before the query reaches a database.

  1. Compile for the target. Generate inspectable SQL for PostgreSQL, MySQL,

SQLite, or DuckDB. DBQC Pro adds Oracle, SQL Server, and DB2.

  1. Run it your way. Execute the SQL with the driver and connection handling

you already use. Store it, test it, diff it in CI, or compile the same query for another supported dialect.

For the full technical model, including boundaries and limitations, read the Product Reference.

What you get

languages and supported database dialects. See multi-database products and shared query logic.

executed. See every check and its purpose in Query Safety.

and emitted-SQL previews keep query work visible before it reaches CI. See VS Code Integration.

one compiled statement. See atomic write-read workflows.

inspect, test, and compare in CI. Start with CI query checks or Query Comparison.

definition, then validate and generate the destination dialect as you move. See the Migration Guide and the Oracle-to-Postgres example.

schema. See the API Guide and Code Generation.

you parts you can rearrange. See the tutorial showcases for three scenarios where named building blocks outperform generated SQL.

Pricing, at a glance

DBQC meters compilation attempts, not database executions. A query that has been compiled can be executed as often as your application needs with no DBQC execution metering.

lasts 30 days, while personal and nonprofit use has no time limit.

standard dialects; Team and Business plans add independently allocated keys.

or DB2.

See Pricing for the complete tier table, operation rules, introductory-renewal terms, and nonprofit or first-year-startup offer.

Choose your next page

Use Cases and evaluate it on the work.

DBQC vs SQLAlchemy, or DBQC vs dbt.

Product Reference.