Skip to content

Instantly share code, notes, and snippets.

@sullivan-
Last active January 3, 2016 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sullivan-/ca39baf6637037529421 to your computer and use it in GitHub Desktop.
Save sullivan-/ca39baf6637037529421 to your computer and use it in GitHub Desktop.
import com.github.nscala_time.time.Imports._
import longevity.persistence.PState
import scala.concurrent.Future
val blogState: PState[Blog] = getBlogState()
val recentPosts: Future[Seq[PState[BlogPost]]] = blogPostRepo.retrieveByQuery {
import BlogPost.queryDsl._
import BlogPost.props._
blog eqs blogState.assoc and postDate gt DateTime.now - 1.week
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment