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

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

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

trait PadOps {
  protected def v: Expr[?]

  def rpad(length: Expr[Int], fill: Expr[String]): Expr[String] = Expr { implicit ctx =>
    sql"RPAD($v, $length, $fill)"
  }

  def lpad(length: Expr[Int], fill: Expr[String]): Expr[String] = Expr { implicit ctx =>
    sql"LPAD($v, $length, $fill)"
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy