title: Dynamic query conditions Slick 3.0
body: <p>I am trying to filter a table with parameters that can be optional. With slick 2.1 this worked, but when I go to version 3.0 no longer works, the error is: "can not resolve symbol &amp;&amp;" when I call the function "reduce".</p>
  
  <p>I would appreciate any help .. thank you very much</p>
  
  <p>This is the code:</p>
  
  <pre><code>def getAll(params : ClienteSearchParameters) : DBIOAction[Iterable[Cliente], NoStream, Effect.Read] = {
  
        val q = for {
          (x, (y, z)) &lt;- tabla join (tablaPersonas joinLeft tablaContactos on (_.id === _.idPersona)) on (_.idPersona === _._1.id)
            if {
              List(
                  params.nombre.map(y.nombre === _),
                  params.apellido.map(y.apellido === _),
                  params.fechaAlta.map(x.fechaAlta === _),
                  params.fechaRegistracion.map(x.fechaRegistracion === _)
              ).flatten match {
                case Nil =&gt; LiteralColumn[Boolean](true)
                case seq =&gt; seq.reduce(_ &amp;&amp; _)
              }
            }
        } yield (x, y, z)
  </code></pre>