Compiled query and in clause

44 views
Skip to first unread message

rémi Kowalski

unread,
Feb 17, 2015, 1:05:15 PM2/17/15
to scala...@googlegroups.com
What's the preferred way for using in clause in slick ?

- using inSet but we loose the ability to precompile the query ?
- making a query for each arity with a bunch of unions and precompile them ?
- fallback to SQL ?
- others ?
 
What would you recommend ? And what would be the best solution  performance wise ?


virtualeyes

unread,
Feb 18, 2015, 4:38:41 AM2/18/15
to scala...@googlegroups.com
There is no best solution short of hand rolling arities a la id = ? or id = ? ... in or out of Slick (i.e. unlikely that JDBC and underlying database support collection based values).

Depends on the use case, maybe `inSetBind` will have good enough performance, certainly the most straightforward/maintanable approach...

rémi Kowalski

unread,
Feb 18, 2015, 8:15:52 AM2/18/15
to scala...@googlegroups.com
Ok, i think i will use inSetBind and see if the performance are good enough for my use case.
Reply all
Reply to author
Forward
0 new messages