Mssqlex v2.0.0-beta.0 Mssqlex.Type View Source

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

Link to this type

date()

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

Date as {year, month, day}

Link to this type

datetime()

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

Datetime

Input param.

Link to this type

return_value()

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

Output value.

Link to this type

time()

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

Time as {hour, minute, sec, usec}

Link to this section Functions

Link to this function

decode(value, opts)

View Source
decode(:odbc.value(), opts :: Keyword.t()) :: return_value()

Transforms :odbc return values to Elixir representations.

Link to this function

encode(value, v)

View Source
encode(value :: param(), opts :: Keyword.t()) ::
  {:odbc.odbc_data_type(), [:odbc.value()]}

Transforms input params into :odbc params.