Compile SQL to type-safe code;
catch failures before they happen.

How it works

sqlc generates fully type-safe idiomatic code from SQL.

  1. You write SQL queries
  2. You run sqlc to generate code that presents type-safe interfaces to those queries
  3. You write application code calling the methods sqlc generated.

Seriously, it's that easy. You don't have to write any boilerplate SQL querying code ever again. See the current list of supported programming languages and databases.

✨ Verify schema changes ✨

Schema updates and poorly-written queries often bring down production databases. That’s bad.

When a schema change is proposed, existing queries and code running in production might fail when the schema change is applied. Enter sqlc verify, which analyzes existing queries against new schema changes and errors if there are any issues.

See it in action here or talk to an engineer.

Ready to try it out?
Download the latest release now.

Used by these lovely companies