ColumnHelper

com.phasmidsoftware.tableparser.core.parse.ColumnHelper
See theColumnHelper companion trait
object ColumnHelper

Object containing utility functions for mapping and transforming column names, providing multiple default strategies for common transformations.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete fields

val camelCaseColumnNameMapper: String => String

A mapping function to transform camelCase column names into an underscore-separated format. For every uppercase letter (or digit) in the original string, a preceding underscore is added.

A mapping function to transform camelCase column names into an underscore-separated format. For every uppercase letter (or digit) in the original string, a preceding underscore is added.

Attributes

val camelCaseColumnNameMapperSpace: String => String

A mapping function to transform camelCase or PascalCase column names into a space-separated format. For every uppercase letter (or digit) in the original string, a preceding space is added.

A mapping function to transform camelCase or PascalCase column names into a space-separated format. For every uppercase letter (or digit) in the original string, a preceding space is added.

Attributes

val camelToSnakeCaseColumnNameMapper: String => String

Precede each upper case letter (or digit) with _.

Precede each upper case letter (or digit) with _.

Attributes

val identityMapper: String => String

A mapping function that applies the identity function to a string input. This mapper returns the input string unchanged.

A mapping function that applies the identity function to a string input. This mapper returns the input string unchanged.

Attributes

Givens

Givens

A default ColumnHelper which will work for any underlying type T and which provides no column name mapping at all. This is suitable for the usual case where the names of, e.g., CSV columns, are the same as the names of the case class parameters. Any ColumnHelper[T] defined for a particular T takes precedence over this one.

A default ColumnHelper which will work for any underlying type T and which provides no column name mapping at all. This is suitable for the usual case where the names of, e.g., CSV columns, are the same as the names of the case class parameters. Any ColumnHelper[T] defined for a particular T takes precedence over this one.

Type parameters

T

the underlying type of the resulting ColumnHelper

Attributes

Returns

a new instance of ColumnHelper[T]