SchemaEnforcer

info.fingo.spata.schema.SchemaEnforcer
See theSchemaEnforcer companion object
sealed trait SchemaEnforcer[T <: Tuple]

Actual verifier of CSV data. Checks if CSV record is congruent with schema.

The verification is achieved through recursive implicits for tuple of columns (as input type) and tuple of typed record data (as output type).

Type parameters

T

the tuple (of columns) representing schema

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object emptyEnforcer.type

Members list

Type members

Types

type Out

Output type of the apply method - schema validation core result type: ValidatedRecord[Tuple, Tuple].

Output type of the apply method - schema validation core result type: ValidatedRecord[Tuple, Tuple].

Attributes

Value members

Abstract methods

def apply(columns: T, record: Record): Out

Checks if record meets the type and validation rules imposed by column definitions. It is used by CSVSchema.validate method. Its instances are provided as recursive givens.

Checks if record meets the type and validation rules imposed by column definitions. It is used by CSVSchema.validate method. Its instances are provided as recursive givens.

Value parameters

columns

the tuple of columns containng schema definition

Attributes

Returns

ValidatedRecord paramatrized according to schema definition