package ops

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ops
  2. ToCsvRowReadingOps
  3. ToCsvRowWritingOps
  4. ToCsvCellDecoderOps
  5. ToCsvCellEncoderOps
  6. ToCsvRowDecoderOps
  7. ToCsvRowEncoderOps
  8. ToCsvRowsOps
  9. ToCsvSourceOps
  10. ToCsvSinkOps
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class CsvCellDecoderOps extends AnyRef

    Provides syntax for decoding CSV cells as values.

    Provides syntax for decoding CSV cells as values.

    Importing kantan.csv.ops._ will add the following methods to String:

  2. final class CsvCellEncoderOps[A] extends AnyRef

    Provides syntax for encoding values as CSV cells.

    Provides syntax for encoding values as CSV cells.

    Importing kantan.csv.ops._ will add asCsvCell to any type A such that there exists an implicit CellDecoder[A] in scope.

  3. final class CsvRowDecoderOps extends AnyRef

    Provides syntax for decoding CSV rows as values.

    Provides syntax for decoding CSV rows as values.

    Importing kantan.csv.ops._ will add the following methods to Seq[String]:

  4. final class CsvRowEncoderOps[A] extends AnyRef

    Provides syntax for encoding values as CSV rows.

    Provides syntax for encoding values as CSV rows.

    Importing kantan.csv.ops._ will add asCsvRow to any type A such that there exists an implicit RowEncoder[A] in scope.

  5. final class CsvRowReadingOps[A] extends AnyRef

    Provides syntax for decoding a string as a CSV row.

  6. final class CsvRowWritingOps[A] extends AnyRef

    Provides syntax for encoding single CSV rows as a string.

    Provides syntax for encoding single CSV rows as a string.

    Writing a single row as a String is a surprisingly recurrent feature request. This is how to do it:

    scala> import kantan.csv.rfc
    
    scala> (1, 2, 3).writeCsvRow(rfc)
    res0: String = 1,2,3
  7. final class CsvRowsOps[A] extends AnyRef

    Provides syntax for turning collections into CSV strings.

  8. final class CsvSinkOps[A] extends VersionSpecificCsvSinkOps[A]

    Provides useful syntax for types that have implicit instances of CsvSink in scope.

    Provides useful syntax for types that have implicit instances of CsvSink in scope.

    The most common use case is to turn a value into a CsvWriter:

    val f: java.io.File = ???
    f.asCsvWriter[List[Int]](',', true)

    A slightly less common use case is encode an entire collection to CSV:

    val f: java.io.File = ???
    f.writeCsv[List[Int]](List(List(1, 2, 3), List(4, 5, 6)), ',', true)
  9. final class CsvSourceOps[A] extends AnyRef

    Provides useful syntax for types that have implicit instances of CsvSource in scope.

    Provides useful syntax for types that have implicit instances of CsvSource in scope.

    The most common use case is to turn a value into a CsvReader:

    scala> import kantan.csv._
    
    scala> "1,2,3\n4,5,6".asCsvReader[List[Int]](rfc).toList
    res0: List[ReadResult[List[Int]]] = List(Right(List(1, 2, 3)), Right(List(4, 5, 6)))

    A slightly less common use case is to load an entire CSV file in memory:

    scala> "1,2,3\n4,5,6".readCsv[List, List[Int]](rfc)
    res1: List[ReadResult[List[Int]]] = List(Right(List(1, 2, 3)), Right(List(4, 5, 6)))

    Unsafe versions of these methods are also available, even if usually advised against.

  10. trait ToCsvCellDecoderOps extends AnyRef
  11. trait ToCsvCellEncoderOps extends AnyRef
  12. trait ToCsvRowDecoderOps extends AnyRef
  13. trait ToCsvRowEncoderOps extends AnyRef
  14. trait ToCsvRowReadingOps extends AnyRef
  15. trait ToCsvRowWritingOps extends AnyRef
  16. trait ToCsvRowsOps extends AnyRef
  17. trait ToCsvSinkOps extends AnyRef
  18. trait ToCsvSourceOps extends AnyRef
  19. trait VersionSpecificCsvSinkOps[A] extends AnyRef

Value Members

  1. implicit def toCsvCellDecoderOps(s: String): CsvCellDecoderOps
    Definition Classes
    ToCsvCellDecoderOps
  2. implicit def toCsvCellEncoderOps[A](a: A)(implicit arg0: CellEncoder[A]): CsvCellEncoderOps[A]
    Definition Classes
    ToCsvCellEncoderOps
  3. implicit def toCsvInputOps[A](a: A)(implicit arg0: CsvSource[A]): CsvSourceOps[A]
    Definition Classes
    ToCsvSourceOps
  4. implicit def toCsvOutputOps[A](a: A)(implicit arg0: CsvSink[A]): CsvSinkOps[A]
    Definition Classes
    ToCsvSinkOps
  5. implicit def toCsvRowDecoderOps(ss: Seq[String]): CsvRowDecoderOps
    Definition Classes
    ToCsvRowDecoderOps
  6. implicit def toCsvRowEncoderOps[A](a: A)(implicit arg0: HeaderEncoder[A]): CsvRowEncoderOps[A]
    Definition Classes
    ToCsvRowEncoderOps
  7. implicit def toCsvRowReadingOps[A](a: A)(implicit arg0: CsvSource[A]): CsvRowReadingOps[A]
    Definition Classes
    ToCsvRowReadingOps
  8. implicit def toCsvRowWritingOps[A](a: A)(implicit arg0: RowEncoder[A]): CsvRowWritingOps[A]
    Definition Classes
    ToCsvRowWritingOps
  9. implicit def toCsvRowsOps[A](as: IterableOnce[A])(implicit arg0: HeaderEncoder[A]): CsvRowsOps[A]
    Definition Classes
    ToCsvRowsOps
  10. object cellDecoder extends ToCsvCellDecoderOps
  11. object cellEncoder extends ToCsvCellEncoderOps
  12. object csvRows extends ToCsvRowsOps
  13. object rowDecoder extends ToCsvRowDecoderOps
  14. object rowEncoder extends ToCsvRowEncoderOps
  15. object sink extends ToCsvSinkOps
  16. object source extends ToCsvSourceOps

Inherited from ToCsvRowReadingOps

Inherited from ToCsvRowWritingOps

Inherited from ToCsvCellDecoderOps

Inherited from ToCsvCellEncoderOps

Inherited from ToCsvRowDecoderOps

Inherited from ToCsvRowEncoderOps

Inherited from ToCsvRowsOps

Inherited from ToCsvSourceOps

Inherited from ToCsvSinkOps

Inherited from AnyRef

Inherited from Any

Ungrouped