Decoder

skunk.Decoder
See theDecoder companion object
trait Decoder[A]

Decoder of Postgres text-format data into Scala types.

Attributes

Companion
object
Source
Decoder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Codec[A]
Self type
Decoder[A]

Members list

Value members

Abstract methods

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

Attributes

Source
Decoder.scala
def types: List[Type]

Attributes

Source
Decoder.scala

Concrete methods

def emap[B](f: A => Either[String, B]): Decoder[B]

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

Source
Decoder.scala
def filter[B](f: A => Boolean): Decoder[A]

An equivalent decoder that filters results, failing with a generic error message when the filter condition is not met.

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

Source
Decoder.scala
def length: Int

Attributes

Source
Decoder.scala
def map[B](f: A => B): Decoder[B]

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

Source
Decoder.scala
def opt: Decoder[Option[A]]

Lift this Decoder into Option.

Lift this Decoder into Option.

Attributes

Source
Decoder.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

Source
Decoder.scala
override def toString: String

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
Any
Source
Decoder.scala
def ~[B](fb: Decoder[B]): Decoder[(A, B)]

Shorthand for product.

Shorthand for product.

Attributes

Source
Decoder.scala

Deprecated methods

def gmap[B](implicit ev: Aux[B, A]): Decoder[B]

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

Deprecated
true
Source
Decoder.scala