Skip to content

Field null in Override configuration is ignored. #413

Closed

Description

@ipsusila

Hi, thank you for the nice software. I'm facing the following issue, in which the overrides settings was not applied properly.

When the configuration is:

overrides:
  - go_type: "sql.NullInt64"
    db_type: "integer"
    null: true

the null config value is not decoded properly. However, if I changed the configuration to (use "null" as field name)

overrides:
  - go_type: "sql.NullInt64"
    db_type: "integer"
    "null": true

sqlc will correctly override type as expected. In the former case, YAML decoder is failed to decode the configuration (the value is always false), perhaps because the field name is null.
Probably this issue is related to #412 too?

Activity

  1. kyleconroy commented on Mar 22, 2020

    @kyleconroy
    Collaborator

    Oof, bitten again by the strangeness of the YAML spec. We'll probably rename the field to be something like not_null or is_null.

  2. added a commit that references this issue on May 3, 2020
    5060694
  3. kyleconroy commented on Jun 26, 2020

    @kyleconroy
    Collaborator

    Closing in favor of #570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions