CellParsers
Trait to define the various parsers for reading case classes and their parameters from table rows.
NOTE: In each of these cellParser methods, the CellParser has a parse method which ignores the columns.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object AttributeSetclass RawParsersobject WithHeaderRowobject StdCellParsersclass TableParserHelper[X]
Members list
Value members
Concrete methods
Method to return a CellParser[T] based on a function to convert a P into a T
Method to return a CellParser[T] based on a function to convert a P into a T
Type parameters
- P
-
the type of the intermediate type.
- T
-
the underlying type of the result.
Value parameters
- construct
-
a function P => T.
Attributes
- Returns
-
a SingleCellParser which converts a String into the intermediate type P and thence into a T
Method to return a CellParser[T] where T is a 2-ary Product and which is based on a function to convert a (K,P) into a T. This method differs from cellParser2 in that the parser of P (a CellParser[P]) is not found implicitly, but rather is looked up dynamically depending on the value of the first parameter (of type K).
Method to return a CellParser[T] where T is a 2-ary Product and which is based on a function to convert a (K,P) into a T. This method differs from cellParser2 in that the parser of P (a CellParser[P]) is not found implicitly, but rather is looked up dynamically depending on the value of the first parameter (of type K).
Type parameters
- K
-
the type of the conditional lookup key, which is also the type of the first field of
T. Typically, this will be aString, but it could also be an Int or something more exotic. - P
-
the type of the second field of the Product type
T. - T
-
the underlying type of the result, a case class with two fields.
Value parameters
- construct
-
a function
(K,P) => T, usually the apply method of a case class. - helper
-
the ColumnHelper[T].
- m
-
the Mirror of T, from which the field names come.
- parsers
-
a
Map[K, CellParser[P]]which determines which particular parser ofPwill be used. The key value looked up is the value of the first (K) field.
Attributes
- Returns
-
a
MultiCellParserwhich converts Strings from a Row into the field typesKandPand thence into aT.
Method to return a CellParser[Option[P]].
Method to return a CellParser[Option[P]].
This class is used for optional types which are non-scalar, i.e., there are no implicitly defined parsers for the Option[P].
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a
SingleCellParser[Option[P]]
Method to return a CellParser[Seq[P]] from a potentially unlimited set of P objects. The counting of the elements starts at start (defaults to 1).
Method to return a CellParser[Seq[P]] from a potentially unlimited set of P objects. The counting of the elements starts at start (defaults to 1).
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a MultiCellParser[Seq[P]
Method to return a CellParser[Seq[P]. This is used only by unit tests. CONSIDER eliminating this; only used in unit tests
Method to return a CellParser[Seq[P]. This is used only by unit tests. CONSIDER eliminating this; only used in unit tests
Type parameters
- P
-
the underlying type of the result
Attributes
- Returns
-
a MultiCellParser[Seq[P]
Method to yield a ColumnHelper[T] based on an optional prefix, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on an optional prefix, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- maybePrefix
-
an optional prefix for the column name.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
Method to yield a ColumnHelper[T] based on a column name mapper, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on a column name mapper, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- columnNameMapper
-
a mapper of String=>String which will translate case class parameter names into column names.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
Method to yield a ColumnHelper[T] based on a column name mapper, an optional prefix, and some number of explicit aliases,
Method to yield a ColumnHelper[T] based on a column name mapper, an optional prefix, and some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
- columnNameMapper
-
a mapper of String=>String which will translate case class parameter names into column names.
- maybePrefix
-
an optional prefix for the column name.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
Method to yield a ColumnHelper[T] based on some number of explicit aliases,
Method to yield a ColumnHelper[T] based on some number of explicit aliases,
Type parameters
- T
-
the underlying type of the resulting ColumnHelper
Value parameters
- aliases
-
a variable number of explicit aliases to translate specific case class parameter names into their column name equivalents.
Attributes
- Returns
-
a new instance of ColumnHelper[T]
Method to return a CellParser[RawRow] from a Row.
Method to return a CellParser[RawRow] from a Row.
Attributes
- Returns
-
a CellParser[RawRow]
Concrete fields
Method to return a CellParser[Option[String].
Method to return a CellParser[Option[String].
TODO: why do we need this in addition to cellParserOption?
CONSIDER: using BlankException as above...
Attributes
- Returns
-
a SingleCellParser[Option[String]