zio.blocks.schema.csv.CsvWriter
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
- Graph
-
- Supertypes
-
trait Matchable
class Any
- Self type
-
Members list
Serializes a complete CSV document with a header row followed by data rows.
Serializes a complete CSV document with a header row followed by data rows.
Value parameters
- config
-
the CSV configuration
- header
-
the column header names
- rows
-
the data rows, each an indexed sequence of field values
Attributes
- Returns
-
a complete CSV document string with header and all data rows
- Source
-
CsvWriter.scala
Serializes a single row of fields as a CSV line.
Serializes a single row of fields as a CSV line.
Value parameters
- config
-
the CSV configuration controlling delimiter, quoting, and line termination
- fields
-
the field values to serialize
Attributes
- Returns
-
a CSV-formatted row string terminated by config.lineTerminator
- Source
-
CsvWriter.scala