Skip to content

field emit_pointers_for_null_types not found in type config.v1PackageSettings #2042

@abhijit-hota

Description

@abhijit-hota

Version

1.16.0

What happened?

Generating Golang code with emit_pointers_for_null_types: true results in the following error:

error parsing sqlc.yaml: yaml: unmarshal errors:
  line 11: field emit_pointers_for_null_types not found in type config.v1PackageSettings

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

version: 1

packages:
  - name: "models"
    engine: "postgresql"
    sql_package: "pgx/v4"
    path: "./models"
    queries: "./sql"
    schema: "./migrations"

    emit_pointers_for_null_types: true
    emit_prepared_queries: true
    emit_db_tags: true
    emit_json_tags: true
    emit_result_struct_pointers: true
    emit_interface: true

    output_files_suffix: "_gen"
    output_db_file_name: "db_gen.go"

overrides:
  - db_type: "uuid"
    go_type: "string"
    nullable: false

  - db_type: "uuid"
    nullable: true
    go_type:
      type: "sql.NullString"

  - db_type: "testcol"
    nullable: false
    go_type: "string"

  - db_type: "testcol"
    nullable: true
    go_type:
      type: "sql.NullString"

  - column: "logo"
    go_type:
      import: "github.com/mypkg/internal/sqltypes"
      package: "types"
      type: "AssetURL"

  - column: "upis.location"
    go_type:
      type: "Location"

  - column: "aa.transactions.extracted_time"
    go_type:
      type: "sql.NullString"

  - column: "public.users.timezone"
    go_type:
      type: "Timezone"

rename:
  uuid: "UUID"
  jti: "JTI"

Playground URL

No response

What operating system are you using?

Linux

What database engines are you using?

PostgreSQL

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerstriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions