Skip to content

Instantly share code, notes, and snippets.

@ryanpbrewster
Created May 4, 2016 20:59
Show Gist options
  • Select an option

  • Save ryanpbrewster/bcc8958d4733aff6de037cbc5e6140b1 to your computer and use it in GitHub Desktop.

Select an option

Save ryanpbrewster/bcc8958d4733aff6de037cbc5e6140b1 to your computer and use it in GitHub Desktop.
def runBF[T](bf: BatchFetchable[T]): T = {
val entities = Entities(
users = getManyUsersFromDb(bf.keys.users),
groups = getManyGroupsFromDb(bf.keys,groups),
posts = getManyPostsFromDb(bf.keys.posts),
msgs = getManyMsgsFromDb(bf.keys.msgs)
)
bf.run(entities)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment