A Schema[A]
describes the structure of some data type A
, in terms of case classes, enumerations (sealed traits), collections, and various primitive types (including not only Scala's own primitive types, but enhanced with java.time and big integers / decimals).
Schemas models the structure of data types as first class values, so they can be introspected, transformed, and combined using ordinary Scala code, without macros, metaprogramming, or codegen.
There are implicit schemas provided for all standard Scala types, and you can automatically derive schemas for your own data types by using DeriveSchema.gen[A]
. Whether you write them by hand by using constructors and operators,
final case class Person(name: String, age: Int)
object Person {
implicit val personSchema: Schema[Person] = DeriveSchema.gen[Person]
}
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
class Set[A]class Dynamictrait Enum[Z]class Enum19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z]class Enum20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z]class Enum21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z]class Enum22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z]class Fail[A]class Lazy[A]class Optional[A]class Primitive[A]trait Record[R]trait CaseClass0[Z]trait CaseClass18[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z]trait CaseClass19[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z]trait CaseClass20[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z]trait CaseClass21[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z]trait CaseClass22[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, Z]class GenericRecordShow all
- Self type
-
Schema[A]
Members list
Type members
Types
Value members
Abstract methods
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Returns a new schema that with annotation
Returns a new schema that with annotation
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
Chunk of annotations for this schema
Chunk of annotations for this schema
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
The default value for a Schema
of type A
.
The default value for a Schema
of type A
.
Attributes
Concrete methods
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
A symbolic operator for orElseEither.
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Convert to Schema[B] iff B and A are homomorphic.
Convert to Schema[B] iff B and A are homomorphic.
This can be used to e.g convert between a case class and it's "generic" representation as a ListMap[String,_]
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Performs a diff between thisValue and thatValue. See zio.schema.Differ for details on the default diff algorithms.
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Generate a homomorphism from A to B iff A and B are homomorphic
Generate a homomorphism from A to B iff A and B are homomorphic
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that modifies the type produced by this schema to be optional.
Returns a new schema that modifies the type produced by this schema to be optional.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Returns a new schema that combines this schema and the specified schema together, modeling their either composition.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Patch value with a Patch.
Patch value with a Patch.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
, without possibility of failure.
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Transforms this Schema[A]
into a Schema[B]
, by supplying two functions that can transform between A
and B
(possibly failing in some cases).
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Attributes
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.
Returns a new schema that combines this schema and the specified schema together, modeling their tuple composition.