Skip to content

Instantly share code, notes, and snippets.


Alex Lee alexlee85

Block or report user

Report or block alexlee85

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alexlee85 / slick-dynamic-filter
Created Nov 17, 2014
Scala Slick dynamic filter
View slick-dynamic-filter
implicit class QueryHelper[T, E](query: Query[T, E, Seq]) {
def optionFilter[X, R: CanBeQueryCondition](name: Option[X])(f: (T, X) => R) = => query.withFilter(f(_, v))).getOrElse(query)
query.optionFilter(name)( === _)
.optionFilter(email)( === _).list
You can’t perform that action at this time.