I've been digging Bookshelf documentation but I can't find enough information to get 5 random users from the database. Right now, the following code retrieves all users.
User.fetchAll().then((users) => {
});
However, is it possible to do something like this?
User.take(5).random().get().then((users) => {
// random 5 users in users collection
});
I really don't want to write raw SQL but I'm fine doing it inside ORM using .query callbacks if necessary.