Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def getAllUsers: Future[List[User]] = {
select
.fetch()
}
def getByid(id: String): Future[Option[String]] = {
select(_.name)
.where(_.id eqs id)
.allowFiltering()
.one()
}
def getByQuery(email: String, name: String): Future[Option[(String, Set[String])]] = {
select(_.id, _.email)
.where(_.email contains email)
.and(_.name eqs name)
.allowFiltering()
.one()
}
def getByidAndName(id: String): Future[List[User]] = {
update
.where(_.id eqs id)
.modify(_.name setTo "newUser")
.future()
getAllUsers
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment