Marcin Wisniowski
05/17/2018, 12:01 AMUser.find { Users.confirmed eq true }.sortedBy { it.loginTimestamp }.take(10)
It works, but is it efficient or does it load all users from the database? I'm not sure if the limiting and sorting is done inside the database, or in my code, it looks like it's done in my code, but I want it to happen as part of the query.tapac
05/17/2018, 9:23 AMUser.wrapRows(
Users.select { Users.confirmed eq true }.orderBy{ Users.loginTimestamp }.limit(10)
)
Marcin Wisniowski
05/17/2018, 12:23 PM