package csv

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. csv
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package generic

Type Members

  1. trait CellDecoder[T] extends AnyRef

    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.syntax.all._.

    Annotations
    @implicitNotFound() @FunctionalInterface()
  2. trait CellDecoderInstances1 extends AnyRef
  3. trait CellDecoderInstances2 extends AnyRef
  4. trait CellEncoder[T] extends AnyRef

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

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

    Annotations
    @implicitNotFound() @FunctionalInterface()
  5. trait CellEncoderInstances1 extends AnyRef
  6. trait CellEncoderInstances2 extends AnyRef
  7. class CsvException extends Exception
  8. 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.

  9. 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.syntax.all._.

    Annotations
    @implicitNotFound()
  10. 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.

    Annotations
    @implicitNotFound()
  11. class DecoderError extends CsvException
  12. type DecoderResult[T] = Either[DecoderError, T]
  13. trait EnumDecoders extends AnyRef
  14. trait EnumEncoders extends AnyRef
  15. sealed trait EscapeMode extends AnyRef

    Controls the escaping when outputting CSV.

  16. final case class Exported[A](instance: A) extends AnyVal with Product with Serializable
  17. trait ExportedCellDecoders extends AnyRef
  18. trait ExportedCellEncoders extends AnyRef
  19. trait ExportedRowDecoderFs extends AnyRef
  20. trait ExportedRowEncoderFs extends AnyRef
  21. sealed trait HasHeaders[H[+a] <: Option[a], Header] extends (RowF[H, Header]) => CsvRow[Header]

    Witness that a RowF has headers of a certain type.

  22. class HeaderError extends CsvException
  23. type HeaderResult[T] = Either[HeaderError, NonEmptyList[T]]
  24. class HeaderSizeError extends HeaderError

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

  25. trait LiteralCellDecoders extends AnyRef
  26. trait LiteralCellEncoders extends AnyRef
    Annotations
    @nowarn()
  27. type NoneF[+A] = None.type

    Higher kinded version of scala.None.

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

  28. trait ParseableHeader[Header] extends AnyRef

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

  29. final class PartiallyAppliedDecodeGivenHeaders[T] extends AnyVal
  30. final class PartiallyAppliedDecodeSkippingHeaders[T] extends AnyVal
  31. final class PartiallyAppliedDecodeUsingHeaders[T] extends AnyVal
  32. final class PartiallyAppliedDecodeWithoutHeaders[T] extends AnyVal
  33. final class PartiallyAppliedEncodeGivenHeaders[T] extends AnyVal
  34. final class PartiallyAppliedEncodeUsingFirstHeaders[T] extends AnyVal
  35. final class PartiallyAppliedEncodeWithoutHeaders[T] extends AnyVal
  36. trait PlatformCellDecoders extends AnyRef
  37. trait PlatformCellEncoders extends AnyRef
  38. sealed trait QuoteHandling extends AnyRef
  39. type Row = RowF[NoneF, Nothing]

    A CSV row without headers.

  40. 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.syntax.all._.

    Annotations
    @implicitNotFound()
  41. trait RowDecoderF[H[+a] <: Option[a], T, Header] extends AnyRef

    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.syntax.all._.

    Annotations
    @FunctionalInterface()
  42. 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.

    Annotations
    @implicitNotFound()
  43. trait RowEncoderF[H[+a] <: Option[a], T, Header] extends AnyRef

    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.

    Annotations
    @implicitNotFound() @FunctionalInterface()
  44. case class RowF[H[+a] <: Option[a], Header](values: NonEmptyList[String], headers: H[NonEmptyList[Header]], line: Option[Long] = None) extends Product with Serializable

    A CSV row with or without headers.

    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.

  45. trait WriteableHeader[Header] extends AnyRef

Value Members

  1. def decodeGivenHeaders[T]: PartiallyAppliedDecodeGivenHeaders[T]

    Decode a char-like stream (see fs2.data.text.CharLikeChunks) into a specified type.

    Decode a char-like stream (see fs2.data.text.CharLikeChunks) into a specified type.

    Scenarios: - If skipHeaders is false, then the file contains no headers. - If skipHeaders is true, then the headers in the file will be skipped.

    For both scenarios the file is assumed to be compliant with the set of headers given.

  2. def decodeSkippingHeaders[T]: PartiallyAppliedDecodeSkippingHeaders[T]

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

  3. def decodeUsingHeaders[T]: PartiallyAppliedDecodeUsingHeaders[T]

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

  4. def decodeWithoutHeaders[T]: PartiallyAppliedDecodeWithoutHeaders[T]

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

  5. def encodeGivenHeaders[T]: PartiallyAppliedEncodeGivenHeaders[T]

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

  6. def encodeUsingFirstHeaders[T]: PartiallyAppliedEncodeUsingFirstHeaders[T]

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

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

  7. def encodeWithoutHeaders[T]: PartiallyAppliedEncodeWithoutHeaders[T]

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

  8. object CellDecoder extends CellDecoderInstances1 with CellDecoderInstances2 with LiteralCellDecoders with ExportedCellDecoders with PlatformCellDecoders
  9. object CellEncoder extends CellEncoderInstances1 with CellEncoderInstances2 with LiteralCellEncoders with EnumEncoders with ExportedCellEncoders with PlatformCellEncoders
  10. object CsvRow
  11. object CsvRowDecoder
  12. object CsvRowEncoder
  13. object EscapeMode
  14. object HasHeaders
  15. object ParseableHeader
  16. object QuoteHandling
  17. object Row
  18. 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.syntax.all._.

  19. object RowDecoderF extends ExportedRowDecoderFs
  20. object RowEncoder
  21. object RowEncoderF extends ExportedRowEncoderFs
  22. object RowF extends Serializable
  23. object WriteableHeader
  24. object lenient
  25. object lowlevel

    Low level pipes for CSV handling.

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped