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

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

The newest version!
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