score:1
Accepted answer
The following seems to work for me:
joinedTable
.filter({ case ((a, b), c) => List(
searchStr.map(t => (a._2 like t)),
searchStr.map(t => b.filter(_._1 like t).isDefined),
searchStr.map(t => c.filter(_._1 like t).isDefined)
)
.flatten
.reduceLeftOption(_ || _)
.getOrElse(false: Rep[Boolean])
})
Source: stackoverflow.com
Related Query
- Slick 3.1, Left Joins and Filters
- Functional programming, Scala map and fold left
- Slick 3.0 Insert and then get Auto Increment Value
- What is the difference between inSet and inSetBind in Slick
- multiple joins with slick
- Using Auto Incrementing fields with PostgreSQL and Slick
- Slick confused about numThreads and best practice for good performance
- Why does Play action fail with "no suitable driver found" with Slick and PostgreSQL?
- Slick left/right/outer joins with Option
- Slick and filtering by Option columns
- Transforming Slick Streaming data and sending Chunked Response using Akka Http
- Scala fold right and fold left
- Slick 3 multiple outer joins
- Mapping Between Enumeration on Scala and Slick
- How to apply manually evolutions in tests with Slick and Play! 2.4
- Slick left outer join fetching whole joined row as option
- Slick Database Sessions, Efficiency, and Threading in Akka
- Slick join two tables and get result of both
- How to use LEFT and RIGHT keyword in SPARK SQL
- Slick query with multiple joins, group by and having
- Scala Slick 3.1 multiple joins
- Async before and after for creating and dropping scala slick tables in scalatest
- Scalatra / Slick and insert IF NOT EXISTS
- Slick 2 - Update columns in a table and return whole table object
- Scala Slick and complex types in my database
- How to call a stored procedure and get return value in Slick (using Scala)
- Scala 22param limit trying to find a workaround and still use for comprehensions instead of plain SQL in Slick
- Check if element exists in database using Slick 3 and Play
- Slick Join Left Option column
- Scala Slick 3.0 implicit mapping between java8 OffsetDateTime and Timestamp
More Query from same tag
- Scala Camel - Common code after choice and otherwise
- How to correctly type-annotate this HList?
- How should I handle database evolutions when using Play and Slick? Must I manually write SQL?
- Scala generic Class[_] parameter
- Parse Array with circe
- scala: Error occurred during initialization of VM on Ubuntu 12.04
- Executing tags as per desired order and enabling BeforeAll and AfterAll in scala
- Extract Embedded AWS Glue Connection Credentials Using Scala
- Effective comment annotation in Scala Eclipse Plugin?
- error while reading hbase 1.2.5 table in spark 2.4
- What's required to have sbt build with Akka?
- Scala How do I add comma to numbers in a string that is in a list?
- case class copy 'method' with superclass
- Play Framework 2.2.1 / How should controller handle a queryString in JSON format
- How to stop play 2.0.4 throwing java.lang.NoSuchMethodError: org.sbtidea.SbtIdeaPlugin
- how to conditionally add resources to a call
- Why value method cannot be used outside macros?
- How to overwrite NaN or Infinity result when performing arithmetic on Double?
- Spark Streaming with mapGroupsWithState
- Scala/Lift- How do I do a page redirect with params?
- spark dataframe filter and select
- How do I import the User object in Scala's web framework Lift?
- Can this regex be further optimized?
- How can I convert immutable.Map to mutable.Map in Scala?
- Treat Spark RDD like plain Seq
- Spark streaming kafka using scala
- Trait, FunctionN, or trait-inheriting-FunctionN in Scala?
- Scala / Play2 - dynamic constraints based on checkbox value
- How to add meta tags when using the play framework?
- Domain routes in Play Framework 2.3