caustic.runtime.package.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of caustic-runtime_2.12 Show documentation
Show all versions of caustic-runtime_2.12 Show documentation
Reinventing database transactions
The newest version!
package caustic
import scala.language.implicitConversions
package object runtime extends Builder {
// Implicit Conversions.
implicit def bol2flag(value: Boolean): Flag = if (value) True else False
implicit def num2real[T](value: T)(implicit num: Numeric[T]): Real = Real(num.toDouble(value))
implicit def str2text(value: String): Text = if (value.isEmpty) Empty else Text(value)
}