Open fjordansilva opened 10 years ago
I have the same problem, too.
Sorry, we didn't come around creating and testing stored procedures yet. We'll release 0.3.0 shortly with new driver version, so maybe it will already help.
When you want to return data from a procedure you have to use an out parameter. Look here for an example: http://stackoverflow.com/questions/23354160/phpmyadmin-run-mysql-stored-procedure-but-no-output
One problem is, that you can't execute two queries in one raw statement with this module. So it is not possible to query call helloWorld(@a); select @a;
. One workaround is to use a transaction and call one query after the other in a transaction.
I got a problem when I try to create a stored procedure with the driver. I talked to Mauricio and he will investigate on that. See here: https://github.com/mauricio/postgresql-async/issues/102
Both issues are really annoying: that you cannot execute stored procedures and that you cannot send multiple statements with the single raw command. Looks like they both have the same solution and it also seems to be simple.
Hi I'm using this great module in my project but I'm getting an error when I call to stored procedures in MySQL (v5.6.16)
// STORED PROCEDURE: DROP PROCEDURE IF exists
helloWorld
; DELIMITER $$ CREATE PROCEDUREhelloWorld
() BEGIN SELECT user_id, user_name FROM gbl_users; END $$// ERROR: Received an error message -> ErrorMessage(1312,#0A000,PROCEDURE alfrescodb.helloWorld can't return a result set in the given context)
I'm calling the procedure as a "raw" sql. { "action": "raw", "command": "call helloWorld()" }