Stored procedure support in Querydsl

1,541 views
Skip to first unread message

timowest

unread,
Sep 27, 2011, 5:20:40 AM9/27/11
to quer...@googlegroups.com
I just looked at what metadata on stored procedures is available from JDBC. The metadata is sufficient, but I don't know if Querydsl can make using stored procedures really simpler.

Concerning inputs Querydsl could define a type-safe calling signature for stored procedures, but this wouldn't involve any expressions, so nothing really Querydsl-specific.

Mapping outputs to Querydsl expressions would also be difficult.

Querydsl could a bundle a utility for stored procedure wrapper generation, but I am not sure if Querydsl expressions should be involved in that.

Here is the related ticket : https://bugs.launchpad.net/querydsl/+bug/709273

What do you think?

luisfpg

Well, the only thing I can see which could be generated for stored procedures is something like generating an interface for invoking procedures.
However, as OUT and IN/OUT parameters have no equivalent in java, some trick could be done, like generating a class for result with all of those output params.
However, I have no idea on how you could map procedures which returns a result set. Ideally, in the same way as a normal query projection, perhaps generating a Q-Type for a results which are resultsets...
I don't know. I don't really use procedures too much...

Paul

unread,
Sep 11, 2018, 5:19:41 AM9/11/18
to Querydsl
Hey seems it *can* be done? : http://luisfpg.blogspot.com/2013/02/the-beauty-of-querydsl-in-sorting.html

But I'm not using JPA (Or Hibernate.)

This sort of also comes into the realms of running 'raw' or 'native' SQL - again, can that be done? (Without JPA etc.)
Reply all
Reply to author
Forward
0 new messages