Trait to define various renderers for rendering instance of case classes (with their various parameters), containers (Seq and Option), etc. to CSV output.
CONSIDER a mechanism to ensure that objects involving case classes are presented in the same order as specified by the header.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object AttributeSetobject CsvRenderer
Members list
Value members
Concrete methods
Method to return a CsvRenderer[Option[T]] for a T which has several columns (e.g. a case class). None is rendered as the right number of empty cells, so that the columns which follow stay aligned. Use this together with CsvGenerators.optionProductGenerator. (optionRenderer renders None as just one cell.)
Method to return a CsvRenderer[Option[T]] for a T which has several columns (e.g. a case class). None is rendered as the right number of empty cells, so that the columns which follow stay aligned. Use this together with CsvGenerators.optionProductGenerator. (optionRenderer renders None as just one cell.)
Type parameters
- T
-
the underlying type.
Value parameters
- ca
-
the CsvAttributes.
- g
-
the CsvGenerator[T], which determines how many columns a T has.
- r
-
the CsvRenderer[T].
Attributes
- Returns
-
a CsvRenderer[Option[T]].
Method to return a CsvRenderer[ Option[T] ].
Method to return a CsvRenderer[ Option[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[ Option[T] ].
Method to return a CsvRenderer[RawRow].
Method to return a CsvRenderer[RawRow].
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[RawRow].
Method to return a CsvRenderer[ Seq[T] ].
Method to return a CsvRenderer[ Seq[T] ].
Type parameters
- T
-
the underlying type of the first parameter of the input to the render method.
Value parameters
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[ Seq[T] ]
Method to return a CsvRenderer[T] which does not output a T at all, only a number of delimiters according to the value of alignment.
Method to return a CsvRenderer[T] which does not output a T at all, only a number of delimiters according to the value of alignment.
Type parameters
- T
-
the type of the parameter to the render method.
Value parameters
- alignment
-
(defaults to 1): one more than the number of delimiters to output. If you are skipping a Product (such as a case class instance), then you should carefully count up how many (nested) elements to skip. So, for example, if you are skipping a Product with three members, you would set alignment = 3, even though you only want to output 2 delimiters.
- ca
-
the (implicit) CsvAttributes.
Attributes
- Returns
-
a CsvRenderer[T].