Symmetric encoder and decoder of Postgres text-format data to and from Scala types.
Attributes
- Companion:
- object
- Source:
- Codec.scala
- Graph
- Supertypes
- Self type
- Codec[A]
Members list
Value members
Concrete methods
Forget this value is a Codec
and treat it as a Decoder
.
Forget this value is a Codec
and treat it as an Encoder
.
Contramap inputs from, and map decoded results to a new type B
or an error, yielding a Codec[B]
.
Contramap inputs from, and map decoded results to a new type B
or an error, yielding a Codec[B]
.
Attributes
- Source:
- Codec.scala
Adapt this Codec
from twiddle-list type A to isomorphic case-class type B
.
Adapt this Codec
from twiddle-list type A to isomorphic case-class type B
.
Attributes
- Source:
- Codec.scala
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
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
Codec
is semigroupal: a pair of codecs make a codec for a pair.
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns:
a string representation of the object.
- Definition Classes
- Source:
- Codec.scala
Shorthand for product
.
Inherited methods
Contramap inputs from a new type B
, yielding an Encoder[B]
.
Contramap inputs from a new type B
, yielding an Encoder[B]
.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Map decoded results to a new type B
or an error, yielding a Decoder[B]
.
Map decoded results to a new type B
or an error, yielding a Decoder[B]
.
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Encode a value of type A
, yielding a list of Postgres 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 Postgres text-formatted strings, lifted to
Option
to handle NULL
values. Encoding failures raise unrecoverable errors.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
An equivalent decoder that filters results, failing with a generic error message when the
filter condition is not met. For a custom error message use emap
.
An equivalent decoder that filters results, failing with a generic error message when the
filter condition is not met. For a custom error message use emap
.
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Adapt this Encoder
from twiddle-list type A to isomorphic case-class type B
.
Adapt this Encoder
from twiddle-list type A to isomorphic case-class type B
.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Adapt this Decoder
from twiddle-list type A to isomorphic case-class type B
.
Adapt this Decoder
from twiddle-list type A to isomorphic case-class type B
.
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Derive an encoder for the specified list. This is equivalent to list(as.length)
but the
resulting encoder can only encode the exact list that it was passed. Prefer this overload when
possible because it lessens the possibility of attempting to encode a list of the wrong length.
Derive an encoder for the specified list. This is equivalent to list(as.length)
but the
resulting encoder can only encode the exact list that it was passed. Prefer this overload when
possible because it lessens the possibility of attempting to encode a list of the wrong length.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Derive an encoder for a list of size n
that expands to a comma-separated list of
placeholders.
Derive an encoder for a list of size n
that expands to a comma-separated list of
placeholders.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Map decoded results to a new type B
, yielding a Decoder[B]
.
Map decoded results to a new type B
, yielding a Decoder[B]
.
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Oids of types, or mismatches.
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
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
Given an initial parameter index, yield a hunk of sql containing placeholders, and a new index.
Given an initial parameter index, yield a hunk of sql containing placeholders, and a new index.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Attributes
- Inherited from:
- Decoder
- Source:
- Decoder.scala
Derive an equivalent encoder for a row type; i.e., its placeholders will be surrounded by parens.
Derive an equivalent encoder for a row type; i.e., its placeholders will be surrounded by parens.
Attributes
- Inherited from:
- Encoder
- Source:
- Encoder.scala
Shorthand for product
.
Shorthand for product
.