zio.blocks.schema.csv

Members list

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
abstract class CsvCodec[A] extends TextCodec[A]

Abstract codec for encoding and decoding values to/from CSV format.

Abstract codec for encoding and decoding values to/from CSV format.

Extends TextCodec[A] to provide CSV-specific serialization.

Type parameters

A

The type being encoded/decoded

Attributes

Source
CsvCodec.scala
Supertypes
class TextCodec[A]
class Object
trait Matchable
class Any
object CsvCodecDeriver extends Deriver[CsvCodec]

Deriver for CSV codecs that converts between Scala types and CSV row representations.

Deriver for CSV codecs that converts between Scala types and CSV row representations.

Supports all 27 primitive types, flat record types (case classes), and wrapper/newtype types. Variant (sum types), sequence, map, and dynamic types are rejected with clear error messages.

Uses ThreadLocal caches for performance: a reusable CharBuffer for field encoding and a recursive record cache for types with self-referential fields.

Attributes

Source
CsvCodecDeriver.scala
Supertypes
trait Deriver[CsvCodec]
class Object
trait Matchable
class Any
Self type
object CsvConfig

Attributes

Companion
class
Source
CsvConfig.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
CsvConfig.type
final case class CsvConfig(delimiter: Char = ..., quoteChar: Char = ..., lineTerminator: String = ..., hasHeader: Boolean = ..., nullValue: String = ...)

Configuration for CSV parsing and generation.

Configuration for CSV parsing and generation.

Value parameters

delimiter

The character used to separate fields (default: ',')

hasHeader

Whether the first row contains column headers (default: true)

lineTerminator

The line terminator sequence (default: "\r\n" for RFC 4180)

nullValue

The string representation for null values (default: "")

quoteChar

The character used to quote fields containing special characters (default: '"'). Escaping within quoted fields is done by doubling the quote character per RFC 4180.

Attributes

Companion
object
Source
CsvConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed abstract class CsvError(val message: String) extends Throwable

Sealed abstract class representing errors that occur during CSV parsing and processing.

Sealed abstract class representing errors that occur during CSV parsing and processing.

CSV errors are zero-overhead exceptions (no stack trace) designed for performance in CSV codec operations.

Attributes

Companion
object
Source
CsvError.scala
Supertypes
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
class ParseError
class TypeError
object CsvError

Attributes

Companion
class
Source
CsvError.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
CsvError.type
object CsvFormat extends TextFormat[CsvCodec]

CSV text format for schema-driven codec derivation.

CSV text format for schema-driven codec derivation.

Use with Schema[A].derive(CsvFormat) to obtain a CsvCodec[A]. Supports flat case classes (records) and wrapper/newtype types. Variant (sealed trait), sequence, map, and dynamic types are not supported.

Attributes

Source
CsvFormat.scala
Supertypes
trait Format
class Object
trait Matchable
class Any
Self type
CsvFormat.type
object CsvReader

CSV row parsing utility using a state machine approach with proper error reporting.

CSV row parsing utility using a state machine approach with proper error reporting.

Provides methods to parse individual rows, headers, and complete CSV documents. Parsing follows RFC 4180 rules:

  • Unquoted fields end at delimiters, newlines, or EOF
  • Quoted fields preserve delimiters and newlines as literal content
  • Quote characters within quoted fields are escaped by doubling them
  • Handles CR, LF, and CRLF line endings uniformly

Attributes

Source
CsvReader.scala
Supertypes
class Object
trait Matchable
class Any
Self type
CsvReader.type
object CsvWriter

CSV row serialization utility with RFC 4180-compliant field escaping.

CSV row serialization utility with RFC 4180-compliant field escaping.

Provides methods to serialize individual rows, headers, and complete CSV documents. All field values are escaped according to RFC 4180 rules:

  • Fields containing the delimiter, quote character, or newlines are quoted
  • Quote characters within fields are escaped by doubling them
  • Fields not requiring escaping are written as-is

Attributes

Source
CsvWriter.scala
Supertypes
class Object
trait Matchable
class Any
Self type
CsvWriter.type