We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.27.0
models.go
// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.27.0 package repository import ( "github.com/google/uuid" ) type Item struct { ID uuid.UUID `db:"id"` ParentID uuid.UUID `db:"parent_id"` Name string `db:"name"` }
I expect sqlc to generate ParentID *uuid.UUID, because this column is nullable
ParentID *uuid.UUID
No response
CREATE TABLE IF NOT EXISTS items ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), parent_id UUID REFERENCES items (id) NULL, name TEXT NOT NULL );
-- name: CreateItem :exec INSERT INTO items (id, parent_id, name) VALUES (@id, @parent_id, @name);
version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" gen: go: package: "repository" out: "." sql_package: "pgx/v5" emit_all_enum_values: true emit_db_tags: true emit_interface: true emit_json_tags: true emit_prepared_queries: true emit_enum_valid_method: true emit_empty_slices: true emit_params_struct_pointers: true emit_result_struct_pointers: true emit_pointers_for_null_types: true json_tags_case_style: "snake" query_parameter_limit: 2 overrides: - db_type: "uuid" go_type: "github.com/google/uuid.UUID" - db_type: "uuid" go_type: "github.com/google/uuid.UUID" nullable: true
https://play.sqlc.dev/p/5121c5319cdf6954e4bbfd00e098390d567401afe8cd5418ce9fb4217ac902c7
macOS
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
1.27.0
What happened?
Generated
models.go
I expect sqlc to generate
ParentID *uuid.UUID
, because this column is nullableRelevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/5121c5319cdf6954e4bbfd00e098390d567401afe8cd5418ce9fb4217ac902c7
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: