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

calasql-operations_3.0.1.6.source-code.BitwiseFunctionOps.scala Maven / Gradle / Ivy

package scalasql.operations
import scalasql.core.Expr
import scalasql.core.SqlStr.SqlStringSyntax

trait BitwiseFunctionOps[T] extends scalasql.operations.ExprNumericOps[T] {
  protected def v: Expr[T]
  override def &[V: Numeric](x: Expr[V]): Expr[T] = Expr { implicit ctx => sql"BITAND($v, $x)" }

  override def |[V: Numeric](x: Expr[V]): Expr[T] = Expr { implicit ctx => sql"BITOR($v, $x)" }

  override def unary_~ : Expr[T] = Expr { implicit ctx => sql"BITNOT($v)" }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy