diff --git a/sqlc/kcl.mod b/sqlc/kcl.mod index c17f0284..44bf70d4 100644 --- a/sqlc/kcl.mod +++ b/sqlc/kcl.mod @@ -1,5 +1,5 @@ [package] name = "sqlc" edition = "v0.9.0" -version = "0.0.3" +version = "0.0.4" description = "sqlc.dev schema config file" diff --git a/sqlc/sqlc.k b/sqlc/sqlc.k index 8d51e8ae..b438f676 100644 --- a/sqlc/sqlc.k +++ b/sqlc/sqlc.k @@ -167,6 +167,10 @@ schema GoGen: # Either `pgx/v4`, `pgx/v5` or `database/sql`. # Defaults to database/sql. sql_package: "database/sql" | "pgx/v4" | "pgx/v5" = "database/sql" + # One of the following drivers are allowed, the default value will depend on the sql_package + # and is handled by sqlc behavior: + # "github.com/jackc/pgx/v4" | "github.com/jackc/pgx/v5" | "github.com/lib/pq" | "github.com/go-sql-driver/mysql" + sql_driver?: "github.com/jackc/pgx/v4" | "github.com/jackc/pgx/v5" | "github.com/lib/pq" | "github.com/go-sql-driver/mysql" # If true, add DB tags to generated structs. Defaults to false. emit_db_tags: bool = False # If true, include support for prepared queries. Defaults to false. diff --git a/sqlc/sqlc_test.k b/sqlc/sqlc_test.k index 602ee458..d919116e 100644 --- a/sqlc/sqlc_test.k +++ b/sqlc/sqlc_test.k @@ -293,6 +293,7 @@ sql: out: "some/path" omit_unused_structs: true emit_sql_as_comment: true + sql_driver: "github.com/go-sql-driver/mysql" - name: "test_two" schema: "schema.sql" queries: "query.sql"