8000 Paramaters matched to JSON fields are the wrong type · Issue #743 · sqlc-dev/sqlc · GitHub
[go: up one dir, main page]

Skip to content
8000
Paramaters matched to JSON fields are the wrong type #743
Closed
@kyleconroy

Description

@kyleconroy

These parameters should end up as interface{}, not json.RawMessage.

CREATE TABLE "user" (
    "id" INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
    "metadata" JSONB
)

-- name: FindByAddress :one
SELECT * FROM "user" WHERE "metadata"->>'address1' = $1 LIMIT 1
type FindByAddressParams struct {
	metadata json.RawMessage
}

https://play.sqlc.dev/p/cd6227106fb8fb969d1fc9699dd9c03046e26578c589268e30d23573f67037bb

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0