Skip to content

Cannot override to slice of string for JSONB #811

New issue

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

Open
kokizzu opened this issue Nov 25, 2020 · 4 comments
Open

Cannot override to slice of string for JSONB #811

kokizzu opened this issue Nov 25, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@kokizzu
Copy link

kokizzu commented Nov 25, 2020

overrides:
  - column: "questions.answers"
    go_type: "[]string"

the table questions have answers JSONB NOT NULL column
the example value inside that column would be something like this: ["test","123","abc"]

@mvrhov
Copy link

mvrhov commented Nov 25, 2020

It's the same with []byte

@jonleopard
Copy link

Yah I don't think sqlc has []byte support but it would be great if it implemented it.

@NinoFoxx
Copy link

NinoFoxx commented Jan 5, 2023

I'm disappointed to see slices are still not supported. In my case I need to override CockroachDB's BYTES type into []byte because at the moment the field is being set to interface{}.

Is there any plans of adding support for slices anytime soon? @kyleconroy

Edit: never mind, sorry. the BYTEA alias seems to do the trick for me.

@kyleconroy
Copy link
Collaborator

I've created a placeholder proposal in #2761 to track this

@kyleconroy kyleconroy added the enhancement New feature or request label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants