Skip to content
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

sqlite - use []byte for blobs #1693

Merged
merged 1 commit into from
Jul 10, 2022
Merged

Conversation

javiercbk
Copy link
Contributor

To keep the API consistent with mysql

case "blob", "binary", "varbinary", "tinyblob", "mediumblob", "longblob":
    return "[]byte"

and postgres

case "bytea", "blob", "pg_catalog.bytea":
    return "[]byte"

I suggest sqlc uses []byte instead of []uint8. If the field is nullable, it is pointles to have a *[]uint8 (or *[]byte) because slices are already pointers, and a slice can be nil

@kyleconroy kyleconroy merged commit b59cdee into sqlc-dev:main Jul 10, 2022
jlisthood pushed a commit to jlisthood/sqlc that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants