DBQC Adoption FAQ

Does DBQC execute queries or replace our database driver?

No. DBQC compiles a query definition and returns SQL, ordered parameters, and a result schema. Your application continues to use its existing driver, connection pool, transaction boundary, retries, and result handling. This is why a pilot can begin with one query rather than a data-access rewrite. See the query-change walkthrough.

Does DBQC need database credentials?

The compiler does not need database credentials to compile a query definition. Schema discovery is separate: the discovery tool connects directly from the developer or CI environment using a read-only database account to read catalog metadata. It does not read application rows, modify schemas, or execute DML. See Schema Discovery for the connection model and security notes.

What reaches the compiler service?

A network client sends the DBQC query definition, target dialect, and API key to the compile endpoint. That definition includes the table and column schema used by the query, its query structure, and any literals included in the definition. It does not include a database connection string or database credentials. Do not include secrets as query literals; use parameters for values that belong at execution time.

If your organization needs formal data-handling, retention, or availability terms beyond this technical contract, establish those requirements before a production rollout. The pilot is deliberately scoped so that review can happen before broad adoption.

What happens if the compiler is unavailable?

The answer depends on where compilation happens. The Scala compiler can run in-process. Network clients need the compile service when they compile a definition. SQL already compiled and retained by your application remains ordinary SQL for the existing driver to execute; DBQC does not sit between that driver and the database.

For a production design, decide explicitly whether compilation happens during development, CI, deployment, or an application request. Do not put a new remote dependency on a hot execution path accidentally. The CI guide shows the development and build-gate use case.

Why not just ask an AI to write the SQL?

AI solves the problem in front of it. DBQC gives you parts you can rearrange.

An AI writes correct SQL for any single question. The gap shows up over time:

AI is a good way to draft a first query. DBQC is how you maintain, compose, and evolve an estate of queries that share structure and change independently. The tutorial showcases walk through each scenario with working code.

Can we adopt DBQC incrementally alongside jOOQ, SQLAlchemy, or raw SQL?

Yes. Start with a bounded workflow and retain the existing execution tool. DBQC is not a drop-in replacement for every local query API, and it should not be evaluated as one. It earns adoption where editor feedback, compiler checks, testable SQL, shared query definitions, or supported-dialect portability solve a real problem. See DBQC vs jOOQ and DBQC vs SQLAlchemy for the tradeoffs.

What does DBQC validate, and what does it not validate?

DBQC validates the structured DBQC query definition: schema references, types, dependencies, parameter construction, and supported dialect rules. It also reports warnings for risky but legal query patterns, then emits SQL for the chosen target. It does not replace database performance analysis, production data tests, access control, migration tooling, or expert review of business semantics. See the complete Query Safety inventory and Product Reference boundaries.

Can we bring an existing SQL query into DBQC?

Yes. DBQC can disassemble an existing SQL statement into a DBQC definition as a migration or adoption step. From there, the definition can use the ordinary DBQC workflow: schema context, compiler validation, emitted SQL, tests, and CI. Disassembly is a way into the DBQC model; DBQC's authoring and validation unit is the DBQC definition it produces. See the Migration Guide.

How can we try it without a purchase decision?

Use the Free plan for a 30-day commercial evaluation. Personal and nonprofit use has no time limit, within the daily allocation. The best evaluation is the pilot: one real query, a discovered schema, one useful diagnostic or SQL review artifact, one test or CI check, and the same existing execution code.

Where can we find runnable examples?

The repository includes public-ready sample project directories under server/core/dbqc/examples/. They are intentionally small and organized so they can be split into their own public repositories. Begin with the query feedback pilot sample, which mirrors the walkthrough on this site.