MssqlexV3 v3.0.3 MssqlexV3.Type View Source

Type conversions.

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, _) View Source
encode(value :: param(), opts :: Keyword.t()) ::
  {:odbc.odbc_data_type(), [:odbc.value()]}

Transforms input params into :odbc params.