Codec

ldbc.connector.codec.Codec
See theCodec companion object
trait Codec[A] extends Decoder[A], Encoder[A]

Attributes

Companion
object
Source
Codec.scala
Graph
Supertypes
trait Encoder[A]
trait Decoder[A]
class Object
trait Matchable
class Any
Show all
Self type
Codec[A]

Members list

Value members

Concrete methods

def asDecoder: Decoder[A]

Forget this value is a Codec and treat it as a Decoder.

Forget this value is a Codec and treat it as a Decoder.

Attributes

Source
Codec.scala
def asEncoder: Encoder[A]

Forget this value is a Codec and treat it as an Encoder.

Forget this value is a Codec and treat it as an Encoder.

Attributes

Source
Codec.scala
def imap[B](f: A => B)(g: B => A): Codec[B]

Contramap inputs from, and map outputs to, a new type B, yielding a Codec[B].

Contramap inputs from, and map outputs to, a new type B, yielding a Codec[B].

Attributes

Source
Codec.scala
override def opt: Codec[Option[A]]

Lift this Codec into Option, where None is mapped to and from a vector of NULL.

Lift this Codec into Option, where None is mapped to and from a vector of NULL.

Attributes

Definition Classes
Source
Codec.scala
def product[B](fb: Codec[B]): Codec[(A, B)]

Codec is semigroupal: a pair of codecs make a codec for a pair.

Codec is semigroupal: a pair of codecs make a codec for a pair.

Attributes

Source
Codec.scala
def ~[B](fb: Codec[B]): Codec[(A, B)]

Shorthand for product. Note: consider using a *: b *: c instead of a ~ b ~ c.

Shorthand for product. Note: consider using a *: b *: c instead of a ~ b ~ c.

Attributes

Source
Codec.scala

Inherited methods

def decode(offset: Int, ss: List[Option[String]]): Either[Error, A]

Attributes

Inherited from:
Decoder
Source
Decoder.scala
def encode(a: A): List[Option[Encoded]]

Encode a value of type A, yielding a list of MySQL text-formatted strings, lifted to Option to handle NULL values. Encoding failures raise unrecoverable errors.

Encode a value of type A, yielding a list of MySQL text-formatted strings, lifted to Option to handle NULL values. Encoding failures raise unrecoverable errors.

Attributes

Inherited from:
Encoder
Source
Encoder.scala
def length: Int

Attributes

Inherited from:
Decoder
Source
Decoder.scala
def product[B](fb: Encoder[B]): Encoder[(A, B)]

Encoder is semigroupal: a pair of encoders make a encoder for a pair.

Encoder is semigroupal: a pair of encoders make a encoder for a pair.

Attributes

Inherited from:
Encoder
Source
Encoder.scala
def product[B](fb: Decoder[B]): Decoder[(A, B)]

Decoder is semigroupal: a pair of decoders make a decoder for a pair.

Decoder is semigroupal: a pair of decoders make a decoder for a pair.

Attributes

Inherited from:
Decoder
Source
Decoder.scala
def types: List[Type]

Types of encoded fields, in order.

Types of encoded fields, in order.

Attributes

Inherited from:
Encoder
Source
Encoder.scala

Inherited fields

lazy protected val empty: List[Option[Encoded]]

Attributes

Inherited from:
Encoder
Source
Encoder.scala

Extensions

Inherited extensions

extension [A <: Tuple](fa: Encoder[A])
inline def dropUnits(using Invariant[Encoder]): Encoder[DropUnits[A]]

Attributes

Inherited from:
TwiddleSyntax
Source
Twiddles.scala

Implicits

Inherited implicits

implicit def toTwiddleOpCons[B <: Tuple](fb: Encoder[B]): TwiddleOpCons[Encoder, B]

Attributes

Inherited from:
TwiddleSyntax
Source
Twiddles.scala
implicit def toTwiddleOpTo[A](fa: Encoder[A]): TwiddleOpTo[Encoder, A]

Attributes

Inherited from:
TwiddleSyntax
Source
Twiddles.scala
implicit def toTwiddleOpTwo[B](fb: Encoder[B]): TwiddleOpTwo[Encoder, B]

Attributes

Inherited from:
TwiddleSyntax
Source
Twiddles.scala