- Notifications
You must be signed in to change notification settings - Fork 978
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
1.24.0
What happened?
I'm having some trouble getting the emit_pointers_for_null_types option to apply to a SQLite schema & queries, i.e. sql.Null* types aren't replaced with their pointer primitive variants. I've checked that other kinds of Go options work correctly, like emit_result_struct_pointers, emit_interface, and emit_json_tags, but not the null type option. I produced a minimal example that reproduces my issue in this playground link. Not sure if this is a SQLite specific issue, since we have a similar Postgres schema where emit_pointers_for_null_types works fine.
Relevant log output
No response
Database schema
CREATETABLEdummy ( "id"textNOT NULLPRIMARY KEY, "col_1"text );SQL queries
-- name: GetDummy :oneSELECT*FROM dummy WHERE id = ?1; -- name: GetDummies :manySELECT*FROM dummy; -- name: CreateDummy :oneINSERT INTO dummy (id, col_1) VALUES (?1, ?2) RETURNING *; -- name: UpdateDummy :oneUPDATE dummy SET col_1 = ?2WHERE id = ?1 RETURNING *; -- name: DeleteDummy :execDELETEFROM dummy WHERE id = ?1;Configuration
version: "2"sql: - schema: "schema.sql"queries: "query.sql"engine: "sqlite"gen: go: package: "sqlc"out: "./"emit_pointers_for_null_types: truePlayground URL
https://play.sqlc.dev/p/3d5b8939ebe833a68c11808b30ed27c0907bd2cbaf9422951775e7de6349e949
What operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed