Skip to content

Add support for sqlc.slice() #47

Open
@daison12006013

Description

@daison12006013

I've noticed that when using sqlc.slice('names'), it really behaves differently, compared to what it is generated in golang

Expectation:

  • it should make the names as array like data once it's converted to typescript

Outcome:

  • it converts to string | null type only!

in Golang, it is correctly converted and the logic that replaces the docblock SQL Slice is being written properly
image

In typescript, it is wrongly interpreted, basically mysql2 requires to be an array so that it will do its job to wrap it into a comma separated values.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions