Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test("builds complex query") {
- val q = new Query
- q.select (List("one", "two"))
- .from ("tbl")
- .where ("one = 5", db.Query.Where.And)
- .join ("tbl2", "tbl2.id = tbl.id", db.Query.Join.Inner)
- .limit (5)
- .offset (10)
- .orderBy ("cars", db.Query.Sort.Ascending)
- .groupBy (List("cars"))
- assert(q.sql == "select one,two from tbl inner join tbl2 on tbl2.id = tbl.id where one = 5 group by cars order by cars asc limit 5 offset 10")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement