All Downloads are FREE. Search and download functionalities are using the official Maven repository.

calasql-operations_2.13.0.1.9.source-code.ExprBooleanOps.scala Maven / Gradle / Ivy

The newest version!
package scalasql.operations

import scalasql.core.Expr
import scalasql.core.SqlStr.SqlStringSyntax

class ExprBooleanOps(v: Expr[Boolean]) {

  /** TRUE if both Boolean expressions are TRUE */
  def &&(x: Expr[Boolean]): Expr[Boolean] = Expr { implicit ctx => sql"($v AND $x)" }

  /** TRUE if either Boolean expression is TRUE */
  def ||(x: Expr[Boolean]): Expr[Boolean] = Expr { implicit ctx => sql"($v OR $x)" }

  /** Reverses the value of any other Boolean operator */
  def unary_! : Expr[Boolean] = Expr { implicit ctx => sql"(NOT $v)" }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy