Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anazcodes opened this issue Nov 13, 2024 · 3 comments
Labels
📚 mysql enhancement New feature or request

Comments

@anazcodes
Copy link
Contributor

anazcodes commented Nov 13, 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

@anazcodes anazcodes added the enhancement New feature or request label Nov 13, 2024
@dosubot dosubot bot added the 📚 mysql label Nov 13, 2024
@anazcodes 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
@lennycampino
Copy link

lennycampino commented Nov 18, 2024

I have the same issue

@anazcodes
Copy link
Contributor Author

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

@anazcodes
Copy link
Contributor Author

@kyleconroy Could you help on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 mysql enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants