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

Is it Possible to Call Stored Procedures via SimpleQuery ? #69

Open
Phil89a opened this issue Jan 3, 2022 · 9 comments
Open

Is it Possible to Call Stored Procedures via SimpleQuery ? #69

Phil89a opened this issue Jan 3, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Phil89a
Copy link

Phil89a commented Jan 3, 2022

I am trying out MySQL-NIO and I want to be able to call a Stored Procedure from my MySQL database and return the result set to my Swift application, however the SimpleQuery is failing with...

MySQL error: Server error: PROCEDURE Accounts.display_Transactions can't return a result set in the given context

The Stored Procedure only has one select, so it is only returning one result set. If I replace the call with the actual SQL from the Stored Procedure it works.

Is it possible to call a Stored Procedure in this way - or is there another method I should be using ?

thanks

Phil

@0xTim
Copy link
Member

0xTim commented Jan 4, 2022

cc @gwynne

@gwynne
Copy link
Member

gwynne commented Jan 4, 2022

It is currently not possible to call a stored procedure using MySQLNIO at all; there is no implementation of the CLIENT_MULTI_RESULTS capability yet. It's on my TODO list 😕.

@gwynne gwynne self-assigned this Jan 4, 2022
@gwynne gwynne added the bug Something isn't working label Jan 4, 2022
@Phil89a
Copy link
Author

Phil89a commented Jan 4, 2022

Ah pity as I need to keep most of my logic on the server. Not having Stored Procedures means lots of client side logic and SQL statements :(

Hopefully something that can be added soon ?

@gwynne
Copy link
Member

gwynne commented Jan 4, 2022

Yeah, I'm hoping to get to it in the next couple of weeks.

@Phil89a
Copy link
Author

Phil89a commented Jan 4, 2022

Excellent - I can survive until then :-)

@whiterockstudios
Copy link

I would also love to have this 😃

@pingrami
Copy link

when calls to stored procedures will be supported?

@sunpeakstudio
Copy link

Any idea if calling stored procedure from Vapor will ever be available?

@0xTim
Copy link
Member

0xTim commented Nov 24, 2023

ping @gwynne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants