vendredi 3 juillet 2015

get 6 random records with slick 3.0 and postgresql

I need a little help with writing the correct slick (3.0) syntax for getting 6 random rows from a table.

I would like to convert:

select * from [table]
order by random()
limit 6

into slick code.

I have found this page http://ift.tt/1UgV3yX. But being new to scala and slick i can't do it on my own.




Aucun commentaire:

Enregistrer un commentaire