10000 Generated insert method takes in string but returns integer · Issue #3 · sqlc-dev/sqlc-gen-typescript · GitHub
[go: up one dir, main page]

Skip to content
Generated insert method takes in string but returns integer #3
Closed
@woowenjun99

Description

@woowenjun99
  • In my table, I have a field that is of type INTEGER.
  • When I generate the code that takes in the field to be inserted into the database, I need to specify it as a string.
  • Upon INSERT, the value is inserted into the database as a number.
  • My SQLC command for the insert expects a return :one and the same field returns an integer.

Example

-- name: CreateOne :one
INSERT INTO table (something) VALUES ($1) RETURN *;

The function createOne is generated, but the type for something field during insert is incorrect (in this case a string rather than an integer). However, the return type is a number which is correct.

Even though it is not a big issue, it causes some inconvenience.

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

      0