Skip to content

The copyform for MySQL throws "can't encode type float64 to TSV" when one of the column is of type float #3677

Open
@bignyap

Description

@bignyap

Version

1.25.0

What happened?

Copy or Load data should have gone without any error.

Relevant log output

can't encode type float64 to TSV

Database schema

CREATE TABLE tier_base_pricing (
  tier_base_pricing_id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
  base_cost_per_call float NOT NULL,
  base_rate_limit int,
  api_endpoint_id int NOT NULL,
  subscription_tier_id int NOT NULL
);

SQL queries

-- name: CreateTierPricings :copyfrom
INSERT INTO tier_base_pricing (subscription_tier_id, api_endpoint_id, base_cost_per_call, base_rate_limit) 
VALUES (?, ?, ?, ?);

Configuration

version: "2"
sql:
  - schema: "database/sqlc/schema"
    queries: "database/sqlc/queries"
    engine: "mysql"
    gen:
      go:
        out: "database/sqlcgen"
        sql_package: database/sql
        sql_driver: github.com/go-sql-driver/mysql
        emit_empty_slices: true

Playground URL

No response

What operating system are you using?

Windows

What database engines are you using?

MySQL

What type of code are you generating?

Go

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