Skip to content

NULL inet and json types are not handled #739

@kindermoumoute

Description

@kindermoumoute

Table is created with the following query:

CREATE TABLE example (
    key uuid NOT NULL,
    my_ip inet
);

Generated query will be:

-- name: CreateExample :one
INSERT INTO example (key) VALUES ($1) RETURNING *;

Then when I call the query I got this error when calling CreateExample(ctx, uuid.New()):

sql: Scan error on column index 1, name "my_ip": unsupported Scan, storing driver.Value type <nil> into type *net.IP

EDIT: replace inet with json and the same issue happens. More types might be involved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions