You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of VALUES() to refer to the new row and columns is deprecated beginning with MySQL 8.0.20, and is subject to removal in a future version of MySQL. Instead, use row and column aliases, as described in the next few paragraphs of this section.
CREATETABLEdep_names (
mykey VARCHAR(255) NOT NULL,
a VARCHAR(255) NULL,
b VARCHAR(255) NULL,
c VARCHAR(255) NULL,
d VARCHAR(255) NULL,
e VARCHAR(255) NULL,
PRIMARY KEY (mykey)
);
SQL queries
-- name: TestInsert :execINSERT INTO dep_names
(mykey, a, b, c, d, e)
VALUES
(?, ?, ?, ?, ?, ?) as new
ON DUPLICATE KEY UPDATE
a =new.a,
b =new.b,
c =new.c,
d =new.d,
e =new.e;
Version
1.22.0
What happened?
MySQL 8.0.19 deprecated the former ON DUPLICATE KEY syntax for the newer column reference style but
sqlc
doesn't seem to like it.Note the old style
VALUES()
is now deprecated:Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/99bd4e6529ffaae574dacb08c653ada803cc5c95a4a42e795e4a39cb039a4a47
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: