org.squeryl.dsl.ast.CastExpressionNode.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squeryl_2.13.0-M3 Show documentation
Show all versions of squeryl_2.13.0-M3 Show documentation
A Scala ORM and DSL for talking with Databases using minimum verbosity and maximum type safety
The newest version!
package org.squeryl.dsl.ast
import org.squeryl.internals._
class CastExpressionNode(expr: ExpressionNode,
typ: String) extends ExpressionNode {
override def doWrite(sw: StatementWriter) = {
sw.write("cast(")
expr.write(sw)
sw.write(" as " + sw.databaseAdapter.quoteIdentifier(typ) + ")")
}
override def children = List(expr)
override def toString = 'CastExpressionNode + ":" + expr.toString + "::" + typ
}