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
How to specify or what is the way to define to create model for this MySQL procedure call?
Procedure
CREATE PROCEDURE insert_author(IN _name VARCHAR(255),IN _bio TEXT) BEGIN INSERT INTO authors (name, bio) VALUES (_name, _bio); SELECT id, name, bio FROM authors WHERE id = LAST_INSERT_ID(); END;
`
anazcodes
changed the title
How to bind the return values from MySQL stored procedure?
How to specify or what is the way to define to create model for the MySQL procedure CALL ?
Nov 15, 2024
How to specify or what is the way to define to create model for this MySQL procedure call?
Procedure
CREATE PROCEDURE insert_author(IN _name VARCHAR(255),IN _bio TEXT) BEGIN INSERT INTO authors (name, bio) VALUES (_name, _bio); SELECT id, name, bio FROM authors WHERE id = LAST_INSERT_ID(); END;
`
Query
-- name: InsertAuthor :one CALL insert_author(?, ?);
Playground Link:
https://play.sqlc.dev/p/a59a02190745aa97c229f67f4af2834f2928ff5ac4747d713094e23a057b6cbe
What database engines need to be changed?
MySQL
What programming language backends need to be changed?
Go
The text was updated successfully, but these errors were encountered: