View Source Snowpack.Type (Snowpack v0.6.4)

Type conversions.

Note the :odbc return types for decoding can be found here: http://erlang.org/doc/apps/odbc/databases.html#data-types-

Link to this section Summary

Types

Date as {year, month, day}

Datetime

Input param.

Output value.

Time as {hour, minute, sec, usec}

Functions

Transforms :odbc return values to Elixir representations.

Transforms input params into :odbc params.

Link to this section Types

Specs

date() :: {1..9999, 1..12, 1..31}

Date as {year, month, day}

Specs

datetime() :: {date(), time()}

Datetime

Specs

param() :: bitstring() | number() | date() | time() | datetime() | Decimal.t()

Input param.

Specs

return_value() :: bitstring() | integer() | date() | datetime() | Decimal.t()

Output value.

Specs

time() :: {0..24, 0..60, 0..60, 0..999_999}

Time as {hour, minute, sec, usec}

Specs

value() :: :null | term()

Link to this section Functions

Specs

decode(value(), opts :: Keyword.t()) :: return_value()

Transforms :odbc return values to Elixir representations.

Specs

encode(value :: param(), opts :: Keyword.t()) :: {atom(), [nil | term()]}

Transforms input params into :odbc params.