SchemaExpr

zio.blocks.schema.SchemaExpr
See theSchemaExpr companion class
object SchemaExpr

Attributes

Companion
class
Source
SchemaExpr.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
SchemaExpr.type

Members list

Type members

Classlikes

Attributes

Companion
trait
Source
SchemaExpr.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ArithmeticOperator

Attributes

Companion
object
Source
SchemaExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Add
object Divide
object Modulo
object Multiply
object Pow
object Subtract
Show all

Attributes

Companion
trait
Source
SchemaExpr.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait BitwiseOperator

Attributes

Companion
object
Source
SchemaExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object And
object LeftShift
object Or
object RightShift
object Xor
Show all
final implicit class BooleanOps[A, B](self: SchemaExpr[A, B]) extends AnyVal

Logical combinators for boolean SchemaExprs.

Logical combinators for boolean SchemaExprs.

Provided as an implicit class rather than direct methods on SchemaExpr so that downstream libraries can supply their own implicit class with &&/|| overloads for a different result type (e.g. a DDB-specific or SQL-specific expression ADT).

In Scala 2, a direct method found by name suppresses implicit receiver views even when the argument type does not match (SLS §7.3). Moving &&/|| here lifts that suppression: when a downstream library brings in its own ops class via an explicit import, that import-scope implicit takes priority over this companion-scope implicit (Scala 2 implicit priority: local/import

companion), so the downstream overload wins for se && downstreamValue without ambiguity in that context.

Note: two companion-scope implicits providing &&/|| would still be ambiguous for se && se2. Downstream libraries should introduce their ops via explicit import (or a user-facing object) rather than a companion to avoid that scenario.

Attributes

Source
SchemaExpr.scala
Supertypes
class AnyVal
trait Matchable
class Any

Attributes

Companion
trait
Source
SchemaExpr.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ConversionType

Attributes

Companion
object
Source
SchemaExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ByteToDouble
object ByteToFloat
object ByteToInt
object ByteToLong
object ByteToShort
object ByteToString
object CharToInt
object CharToString
object DoubleToFloat
object DoubleToInt
object DoubleToLong
object FloatToDouble
object FloatToInt
object FloatToLong
object FloatToString
object IntToByte
object IntToChar
object IntToDouble
object IntToFloat
object IntToLong
object IntToShort
object IntToString
object LongToByte
object LongToDouble
object LongToFloat
object LongToInt
object LongToShort
object LongToString
object ShortToByte
object ShortToDouble
object ShortToFloat
object ShortToInt
object ShortToLong
object ShortToString
object StringToByte
object StringToFloat
object StringToInt
object StringToLong
object StringToShort
Show all

Attributes

Companion
trait
Source
SchemaExpr.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait LogicalOperator

Attributes

Companion
object
Source
SchemaExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object And
object Or

Attributes

Companion
trait
Source
SchemaExpr.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait RelationalOperator

Attributes

Companion
object
Source
SchemaExpr.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Equal
object GreaterThan
object LessThan
object NotEqual
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

Attributes

Source
SchemaExpr.scala
def arithmetic[S, A](left: SchemaExpr[S, A], right: SchemaExpr[S, A], operator: ArithmeticOperator, numericType: NumericPrimitiveType[A]): SchemaExpr[S, A]

Attributes

Source
SchemaExpr.scala
def bitwise[S, A](left: SchemaExpr[S, A], right: SchemaExpr[S, A], operator: BitwiseOperator): SchemaExpr[S, A]

Attributes

Source
SchemaExpr.scala
def bitwiseNot[S, A](expr: SchemaExpr[S, A]): SchemaExpr[S, A]

Attributes

Source
SchemaExpr.scala
def literal[S, A](value: A)(implicit schema: Schema[A]): SchemaExpr[S, A]

Attributes

Source
SchemaExpr.scala
def logical[S](left: SchemaExpr[S, Boolean], right: SchemaExpr[S, Boolean], operator: LogicalOperator): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def not[S](expr: SchemaExpr[S, Boolean]): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def optic[S, A](path: DynamicOptic, sourceSchema: Schema[S]): SchemaExpr[S, A]

Attributes

Source
SchemaExpr.scala
def relational[S, A](left: SchemaExpr[S, A], right: SchemaExpr[S, A], operator: RelationalOperator): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def schemaDefault[A](implicit schema: Schema[A]): Option[SchemaExpr[Any, A]]

Create a Literal expression from the schema's default value. Gets the default value from the schema and wraps it in a Literal. Returns None if the schema has no default value.

Create a Literal expression from the schema's default value. Gets the default value from the schema and wraps it in a Literal. Returns None if the schema has no default value.

Attributes

Source
SchemaExpr.scala
def stringConcat[S](left: SchemaExpr[S, String], right: SchemaExpr[S, String]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala
def stringContains[S](string: SchemaExpr[S, String], substring: SchemaExpr[S, String]): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def stringEndsWith[S](string: SchemaExpr[S, String], suffix: SchemaExpr[S, String]): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def stringIndexOf[S](string: SchemaExpr[S, String], substring: SchemaExpr[S, String]): SchemaExpr[S, Int]

Attributes

Source
SchemaExpr.scala
def stringLength[S](string: SchemaExpr[S, String]): SchemaExpr[S, Int]

Attributes

Source
SchemaExpr.scala
def stringRegexMatch[S](regex: SchemaExpr[S, String], string: SchemaExpr[S, String]): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def stringReplace[S](string: SchemaExpr[S, String], target: SchemaExpr[S, String], replacement: SchemaExpr[S, String]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala
def stringStartsWith[S](string: SchemaExpr[S, String], prefix: SchemaExpr[S, String]): SchemaExpr[S, Boolean]

Attributes

Source
SchemaExpr.scala
def stringSubstring[S](string: SchemaExpr[S, String], start: SchemaExpr[S, Int], end: SchemaExpr[S, Int]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala
def stringToLowerCase[S](string: SchemaExpr[S, String]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala
def stringToUpperCase[S](string: SchemaExpr[S, String]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala
def stringTrim[S](string: SchemaExpr[S, String]): SchemaExpr[S, String]

Attributes

Source
SchemaExpr.scala

Implicits

Implicits

final implicit def BooleanOps[A, B](self: SchemaExpr[A, B]): BooleanOps[A, B]

Logical combinators for boolean SchemaExprs.

Logical combinators for boolean SchemaExprs.

Provided as an implicit class rather than direct methods on SchemaExpr so that downstream libraries can supply their own implicit class with &&/|| overloads for a different result type (e.g. a DDB-specific or SQL-specific expression ADT).

In Scala 2, a direct method found by name suppresses implicit receiver views even when the argument type does not match (SLS §7.3). Moving &&/|| here lifts that suppression: when a downstream library brings in its own ops class via an explicit import, that import-scope implicit takes priority over this companion-scope implicit (Scala 2 implicit priority: local/import

companion), so the downstream overload wins for se && downstreamValue without ambiguity in that context.

Note: two companion-scope implicits providing &&/|| would still be ambiguous for se && se2. Downstream libraries should introduce their ops via explicit import (or a user-facing object) rather than a companion to avoid that scenario.

Attributes

Source
SchemaExpr.scala