Rerturns an optional SQLSyntax which is flatten (from option array) and joined with 'and'.
Rerturns an optional SQLSyntax which is flatten (from option array) and joined with 'and'.
val cond: Option[SQLSyntax] = SQLSyntax.toAndConditionOpt(Some(sqls"id = $id"), None, Some(sqls"name = $name")) cond.get.statement // "(id = ?) and (name = ?)" cond.get.parameters // Seq(123, "Alice")
Rerturns an optional SQLSyntax which is flatten (from option array) and joined with 'or'.
Rerturns an optional SQLSyntax which is flatten (from option array) and joined with 'or'.
val cond: Option[SQLSyntax] = SQLSyntax.toOrConditionOpt(Some(sqls"id = $id"), None, Some(sqls"name = $name")) cond.get.statement // "(id = ?) or (name = ?)" cond.get.parameters // Seq(123, "Alice")
(Since version 1.6.2) use between(column: SQLSyntax, a: Any, b: Any) instead of this