Asaithambi R
Asaithambi R

Reputation: 11

scala anorm and mysql

I wanna read all the records of the table by using mysql stored procedure with scala play2 anorm.

The procedure below:-

create or replace procedure readAllUsers(p_cur sys_refcursor) as
begin
   open p_cur for select * from users;
end;

your kind help is much appreciatable.

Upvotes: 0

Views: 140

Answers (1)

Gabriele Petronella
Gabriele Petronella

Reputation: 108169

Using raw sql commands you can call stored procedures within anorm. Straight from the documentation examples:

SQL("EXEC readAllUsers").execute()

Upvotes: 1

Related Questions