Type coercion and type checking for column values.
Coercion attempts to convert a value (typically a string from CSV/external data) into the target Elixir type. Type checking verifies that a value already matches the expected type without conversion.
Summary
Types
Column types supported by coercion and type checking.
Functions
Attempts to coerce value to the given type.
Checks whether value already matches the expected type without coercion.
Types
Functions
@spec coerce(term(), supported_type()) :: {:ok, term()} | {:error, String.t()}
Attempts to coerce value to the given type.
Returns {:ok, coerced_value} on success or {:error, message} on failure.
@spec type_check(term(), supported_type()) :: :ok | {:error, String.t()}
Checks whether value already matches the expected type without coercion.
Returns :ok or {:error, message}.