Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement