fs2.data.csv

package fs2.data.csv

Type members

Classlikes

@implicitNotFound("No implicit CellDecoder found for type ${T}.\nYou can define one using CellDecoder.instance, by calling map on another CellDecoder or by using generic derivation for coproducts and unary products.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val cellDecoder: CellDecoder[${T}] = deriveCellDecoder\n\n") @FunctionalInterface
trait CellDecoder[T]

Describes how a cell can be decoded to the given type.

Describes how a cell can be decoded to the given type.

CellDecoder provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, CellDecoder has a https://typelevel.org/cats/api/cats/MonadError.htmlcats`MonadError` instance. To get the full power of it, import cats.implicits._.

Companion:
object
@implicitNotFound("No implicit CellEncoder found for type ${T}.\nYou can define one using CellEncoder.instance, by calling contramap on another CellEncoder or by using generic derivation for coproducts and unary products.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val cellEncoder: CellEncoder[${T}] = deriveCellEncoder\n\n") @FunctionalInterface
trait CellEncoder[T]

Describes how a cell of a given type can be encoded.

Describes how a cell of a given type can be encoded.

Companion:
object
class CsvException(msg: String, val line: Option[Long], inner: Throwable) extends Exception
object CsvRow
class DecoderError(msg: String, val line: Option[Long], inner: Throwable) extends CsvException
sealed trait EscapeMode

Controls the escaping when outputting CSV.

Controls the escaping when outputting CSV.

Companion:
object
object EscapeMode
Companion:
class
final case class Exported[A](instance: A) extends AnyVal
sealed trait HasHeaders[H <: (Option), Header] extends RowF[H, Header] => CsvRow[Header]

Witness that a RowF has headers of a certain type.

Witness that a RowF has headers of a certain type.

Companion:
object
object HasHeaders
Companion:
class
class HeaderError(msg: String, val line: Option[Long], inner: Throwable) extends CsvException
class HeaderSizeError(msg: String, val expectedColumns: Int, val actualColumns: Int, val line: Option[Long], inner: Throwable) extends HeaderError

Raised when processing a Csv row whose width doesn't match the width of the Csv header row

Raised when processing a Csv row whose width doesn't match the width of the Csv header row

trait ParseableHeader[Header]

A type class describing what it means to be a parseable CSV header.

A type class describing what it means to be a parseable CSV header.

Companion:
object
Companion:
class
final class PartiallyAppliedDecodeGivenHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedDecodeSkippingHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedDecodeUsingHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedDecodeWithoutHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedEncodeGivenHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedEncodeUsingFirstHeaders[T](val dummy: Boolean) extends AnyVal
final class PartiallyAppliedEncodeWithoutHeaders[T](val dummy: Boolean) extends AnyVal
Companion:
class
sealed trait QuoteHandling
Companion:
object
object Row
object RowDecoder

Describes how a row can be decoded to the given type.

Describes how a row can be decoded to the given type.

RowDecoder provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, RowDecoder has a cats `MonadError` instance. To get the full power of it, import cats.implicits._.

@FunctionalInterface
trait RowDecoderF[H <: (Option), T, Header]

Describes how a row can be decoded to the given type.

Describes how a row can be decoded to the given type.

RowDecoderF provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, RowDecoderF has a cats `MonadError` instance. To get the full power of it, import cats.implicits._.

Companion:
object
Companion:
class
object RowEncoder
@implicitNotFound("No implicit RowEncoderF[H, found for type ${T}.\nYou can define one using RowEncoderF[H, .instance, by calling contramap on another RowEncoderF[H, or by using generic derivation for product types like case classes.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val csvRowEncoder: RowEncoderF[H, [${T}] = deriveRowEncoderF[H, \nMake sure to have instances of CellEncoder for every member type in scope.\n") @FunctionalInterface
trait RowEncoderF[H <: (Option), T, Header]

Describes how a row can be encoded from a value of the given type.

Describes how a row can be encoded from a value of the given type.

Companion:
object
Companion:
class
case class RowF[H <: (Option), Header](values: NonEmptyList[String], headers: H[NonEmptyList[Header]], line: Option[Long])

A CSV row with or without headers. The presence of headers is encoded via the first type param which is a subtype of scala.Option. By preserving this information in types, it's possible to define Row and CsvRow aliases as if they were plain case classes while keeping the code DRY.

A CSV row with or without headers. The presence of headers is encoded via the first type param which is a subtype of scala.Option. By preserving this information in types, it's possible to define Row and CsvRow aliases as if they were plain case classes while keeping the code DRY.

Operations on columns can always be performed using 0-based indices and additionally using a specified header value if headers are present (and this fact statically known).

'''Note:''' the following invariant holds when using this class: values and headers have the same size if headers are present.

Companion:
object
object RowF
Companion:
class
trait WriteableHeader[Header]
Companion:
object
Companion:
class
object lowlevel

Low level pipes for CSV handling. All pipes only perform one step in a CSV (de)serialization pipeline, so use these if you want to customise. All standard use cases should be covered by the higher level pipes directly on the csv package which are composed of the lower level ones here.

Low level pipes for CSV handling. All pipes only perform one step in a CSV (de)serialization pipeline, so use these if you want to customise. All standard use cases should be covered by the higher level pipes directly on the csv package which are composed of the lower level ones here.

Types

type CsvRow[Header] = RowF[Some, Header]

A CSV row with headers, that can be used to access the cell values.

A CSV row with headers, that can be used to access the cell values.

'''Note:''' the following invariant holds when using this class: values and headers have the same size.

@implicitNotFound("No implicit CsvRowDecoder found for type ${T}.\nYou can define one using CsvRowDecoder.instance, by calling map on another CsvRowDecoder or by using generic derivation for product types like case classes.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val csvRowDecoder: CsvRowDecoder[${T}] = deriveCsvRowDecoder\nMake sure to have instances of CellDecoder for every member type in scope.\n")
type CsvRowDecoder[T, Header] = RowDecoderF[Some, T, Header]

Describes how a row can be decoded to the given type.

Describes how a row can be decoded to the given type.

CsvRowDecoder provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, CsvRowDecoder has a cats `MonadError` instance. To get the full power of it, import cats.implicits._.

@implicitNotFound("No implicit CsvRowEncoderF[H, found for type ${T}.\nYou can define one using CsvRowEncoderF[H, .instance, by calling contramap on another CsvRowEncoderF[H, or by using generic derivation for product types like case classes.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val csvRowEncoder: CsvRowEncoderF[H, [${T}] = deriveCsvRowEncoderF[H, \nMake sure to have instances of CellEncoder for every member type in scope.\n")
type CsvRowEncoder[T, Header] = RowEncoderF[Some, T, Header]

Describes how a row can be encoded from a value of the given type.

Describes how a row can be encoded from a value of the given type.

type DecoderResult[T] = Either[DecoderError, T]
type HeaderResult[T] = Either[HeaderError, NonEmptyList[T]]
type NoneF[+A] = None.type

Higher kinded version of scala.None. Ignores the type param.

Higher kinded version of scala.None. Ignores the type param.

type Row = RowF[NoneF, Nothing]

A CSV row without headers.

A CSV row without headers.

@implicitNotFound("No implicit RowDecoder found for type ${T}.\nYou can define one using RowDecoder.instance, by calling map on another RowDecoder or by using generic derivation for product types like case classes.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val rowDecoder: RowDecoder[${T}] = deriveRowDecoder\nMake sure to have instances of CellDecoder for every member type in scope.\n")
type RowDecoder[T] = RowDecoderF[NoneF, T, Nothing]

Describes how a row can be decoded to the given type.

Describes how a row can be decoded to the given type.

RowDecoder provides convenient methods such as map, emap, or flatMap to build new decoders out of more basic one.

Actually, RowDecoder has a cats `MonadError` instance. To get the full power of it, import cats.implicits._.

@implicitNotFound("No implicit RowEncoder found for type ${T}.\nYou can define one using RowEncoder.instance, by calling contramap on another RowEncoder or by using generic derivation for product types like case classes.\nFor that, add the fs2-data-csv-generic module to your dependencies and use either full-automatic derivation:\nimport fs2.data.csv.generic.auto._\nor the recommended semi-automatic derivation:\nimport fs2.data.csv.generic.semiauto._\nimplicit val rowEncoder: RowEncoder[${T}] = deriveRowEncoder\nMake sure to have instances of CellEncoder for every member type in scope.\n")
type RowEncoder[T] = RowEncoderF[NoneF, T, Nothing]

Describes how a row can be encoded from a value of the given type.

Describes how a row can be encoded from a value of the given type.

Value members

Concrete methods

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains no headers, but is compliant with the set of headers given.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains no headers, but is compliant with the set of headers given.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains headers, but they shall be skipped for decoding.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains headers, but they shall be skipped for decoding.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains headers and they need to be taken into account for decoding.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file contains headers and they need to be taken into account for decoding.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file neither contains headers nor are they needed for decoding.

Decode a char-like stream (see CharLikeChunks) into a specified type, assuming the file neither contains headers nor are they needed for decoding.

Encode a specified type into a CSV prepending the given headers.

Encode a specified type into a CSV prepending the given headers.

Encode a specified type into a CSV that contains the headers determined by encoding the first element. Empty if input is.

Encode a specified type into a CSV that contains the headers determined by encoding the first element. Empty if input is.

Encode a specified type into a CSV that contains no headers.

Encode a specified type into a CSV that contains no headers.