Companion object for the CsvGenerator type class providing implicit instances for various types.
The implicit generators defined here are standard implementations used to generate CSV headers for specific data types. These generators are derived from predefined instances in the CsvGenerators object.
Implicit instances:
- Integer values (
Int), usingCsvGenerators.CsvGeneratorInt - String values (
String), usingCsvGenerators.CsvGeneratorString - Boolean values (
Boolean), usingCsvGenerators.CsvGeneratorBoolean - Double-precision floating-point numbers (
Double), usingCsvGenerators.CsvGeneratorDouble - Arbitrarily large integers (
BigInt), usingCsvGenerators.CsvGeneratorBigInt - Long integer values (
Long), usingCsvGenerators.CsvGeneratorLong - URL values from the
java.netpackage (java.net.URL), usingCsvGenerators.CsvGeneratorURL
Attributes
- Companion
- trait
- Graph
-
- Supertypes
- Self type
-
CsvGenerator.type
Members list
Value members
Concrete methods
Method to derive a CsvGenerator (the column names) for a case class T, so that case class T(...) derives CsvGenerator works. This replaces the generator1 ... generator19 methods of 1.x, and has no limit on the number of fields.
Method to derive a CsvGenerator (the column names) for a case class T, so that case class T(...) derives CsvGenerator works. This replaces the generator1 ... generator19 methods of 1.x, and has no limit on the number of fields.
The column name of each field is exactly the name that CellParser.derived looks for when it reads that field: ColumnHelper[T].lookup of the field's name, given the column name of the enclosing field (if any). So a table which is written can be read back. For example, if ColumnHelper[Principal] has the prefix "$x_$c", the name field of a Principal field called director is in the column director_name. Without a ColumnHelper of its own, a field's column name is its name. A field whose type is itself a case class, and which has no CsvGenerator of its own, is derived in turn.
NOTE: for a case class defined inside a method, see the NOTE on CellParser.derived.
Type parameters
- T
-
a case class.
Value parameters
- ca
-
the CsvAttributes.
- m
-
the Mirror of T.
Attributes
- Returns
-
a CsvProductGenerator[T].
Inherited methods
Method to return a CsvGenerator[ Option[T] ].
Method to return a CsvGenerator[ Option[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Attributes
- Returns
-
a CsvGenerator[ Option[T] ].
- Inherited from:
- CsvGenerators
Method to return a CsvGenerator[Option[T]] whose columns are those of T. Use this for an optional field whose type has several columns (e.g. a case class), together with CsvRenderers.optionProductRenderer. (optionGenerator gives an Option just one column.)
Method to return a CsvGenerator[Option[T]] whose columns are those of T. Use this for an optional field whose type has several columns (e.g. a case class), together with CsvRenderers.optionProductRenderer. (optionGenerator gives an Option just one column.)
Type parameters
- T
-
the underlying type.
Value parameters
- g
-
the CsvGenerator[T].
Attributes
- Returns
-
a CsvGenerator[Option[T]].
- Inherited from:
- CsvGenerators
Method to return a CsvGenerator[ Seq[T] ].
Method to return a CsvGenerator[ Seq[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Attributes
- Returns
-
a CsvGenerator[ Seq[T] ]
- Inherited from:
- CsvGenerators
Method to return a CsvGenerator[T] which does not output a column header for at all.
Method to return a CsvGenerator[T] which does not output a column header for at all.
Type parameters
- T
-
the type of the column objects.
Attributes
- Returns
-
a CsvGenerator[T].
- Inherited from:
- CsvGenerators
Givens
Givens
Inherited givens
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators
Attributes
- Inherited from:
- CsvGenerators