AvroPrism

dev.constructive.eo.avro.AvroPrism
See theAvroPrism companion class
object AvroPrism

Attributes

Companion
class
Source
AvroPrism.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AvroPrism.type

Members list

Value members

Concrete methods

def codecPrism[S](using codec: AvroCodec[S]): AvroPrism[S]

Root AvroPrism[S], summoning the schema from the codec (AvroCodec[S].schema). The reader schema always matches the codec's — there is no explicit-schema overload, since a reader schema diverging from its codec is a footgun (silent misreads on structural drift).

Root AvroPrism[S], summoning the schema from the codec (AvroCodec[S].schema). The reader schema always matches the codec's — there is no explicit-schema overload, since a reader schema diverging from its codec is a footgun (silent misreads on structural drift).

Attributes

Source
AvroPrism.scala

Extensions

Extensions

extension [A](o: AvroPrism[A])
transparent inline def field[B](inline selector: A => B)(using codecB: AvroCodec[B]): AvroPrism[B]

.field(_.x) — drill via selector lambda.

.field(_.x) — drill via selector lambda.

Attributes

Source
AvroPrism.scala
extension [A](o: AvroPrism[A])
def fieldNamed[B](schemaName: String)(using codecB: AvroCodec[B]): AvroPrism[B]

.fieldNamed[B]("schema_name") — drill by the EXPLICIT schema field name, bypassing position resolution. The escape hatch (issue #35) for a hand-written codec whose schema field order diverges from case-class declaration order; the common (derived / order-preserving) codecs need .field(_.x) instead, which resolves the name for you.

.fieldNamed[B]("schema_name") — drill by the EXPLICIT schema field name, bypassing position resolution. The escape hatch (issue #35) for a hand-written codec whose schema field order diverges from case-class declaration order; the common (derived / order-preserving) codecs need .field(_.x) instead, which resolves the name for you.

Attributes

Source
AvroPrism.scala
extension [A](o: AvroPrism[A])
transparent inline def at(i: Int): Any

.at(i) — drill into the i-th array element / map entry.

.at(i) — drill into the i-th array element / map entry.

Attributes

Source
AvroPrism.scala
extension [A](o: AvroPrism[A])
transparent inline def union[Branch]: Any

.union[Branch] — drill into a union alternative by branch type.

.union[Branch] — drill into a union alternative by branch type.

Attributes

Source
AvroPrism.scala
extension [A](o: AvroPrism[A])
transparent inline def each: Any

.each — split into an AvroTraversal over the iterated array.

.each — split into an AvroTraversal over the iterated array.

Attributes

Source
AvroPrism.scala
extension [A](o: AvroPrism[A])
transparent inline def fields(inline selectors: A => Any*): Any

.fields(_.a, _.b, ...) — focus a NamedTuple over selected fields.

.fields(_.a, _.b, ...) — focus a NamedTuple over selected fields.

Attributes

Source
AvroPrism.scala