-
Notifications
You must be signed in to change notification settings - Fork 901
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Milestone
Description
Version
1.26.0
What happened?
When generating a copyfrom query in mysql and setting the query_parameter_limit
to 0
, sqlc incorrectly generates an invalid go file, calling the (e *mysqltsv.Encoder).AppendString(s string)
function with an array of structs as the argument. This code does not compile.
Relevant log output
No response
Database schema
CREATE TABLE author (
id BIGINT UNSIGNED PRIMARY KEY,
name text NOT NULL
);
SQL queries
-- name: CreateAuthors :copyfrom
INSERT INTO author
(name)
VALUES (?);
Configuration
version: "2"
sql:
- engine: "mysql"
schema: "migrations/sqlc"
queries: "queries"
gen:
go:
package: "db"
sql_package: database/sql
sql_driver: github.com/go-sql-driver/mysql
Playground URL
https://play.sqlc.dev/p/34328b7faed42fedb392c42cbe3a6851ebce76e304fcf091fe0f81368d52273c
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed