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

calasql-operations_3.0.1.9.source-code.TrimOps.scala Maven / Gradle / Ivy

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

trait TrimOps {
  protected def v: Expr[?]

  /**
   * Trim [[x]]s from the left hand side of the string [[v]]
   */
  def ltrim(x: Expr[String]): Expr[String] = Expr { implicit ctx => sql"LTRIM($v, $x)" }

  /**
   * Trim [[x]]s from the right hand side of the string [[v]]
   */
  def rtrim(x: Expr[String]): Expr[String] = Expr { implicit ctx => sql"RTRIM($v, $x)" }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy