sqlc-dev / sqlc

Generate type-safe code from SQL
https://sqlc.dev
MIT License
13.54k stars 809 forks source link

How to specify or what is the way to define to create model for the MySQL procedure CALL ? #3704

Open anazcodes opened 1 week ago

anazcodes commented 1 week ago

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

lennycampino commented 1 week ago

I have the same issue

anazcodes commented 1 week ago

@lennycampino I couldn't find any reference for that. I didn't see anyone raise an issue regarding this though.

anazcodes commented 1 week ago

@kyleconroy Could you help on this.