Tds v2.0.3 Tds.Protocol View Source

Implements DBConnection behaviour for TDS protocol

Link to this section Summary

Link to this section Types

Link to this type

env()

View Source
env() :: %{
  trans: <<_::8>>,
  savepoint: non_neg_integer(),
  collation: Tds.Protocol.Collation.t(),
  packetsize: integer()
}
Link to this type

packet_data()

View Source
packet_data() :: binary()
Link to this type

sock()

View Source
sock() :: {:gen_tcp | :ssl, pid()}
Link to this type

state()

View Source
state() :: :ready | :prelogin | :login | :prepare | :executing
Link to this type

t()

View Source
t() :: %Tds.Protocol{
  env: env(),
  itcp: term(),
  opts: Keyword.t(),
  query: nil | String.t(),
  result: nil | list(),
  sock: nil | sock(),
  state: state(),
  transaction: transaction(),
  usock: nil | pid()
}
Link to this type

transaction()

View Source
transaction() :: nil | :started | :successful | :failed

Link to this section Functions

Link to this function

send_close(query, params, s)

View Source
Link to this function

send_param_query(_, params, s)

View Source
send_param_query(Tds.Query.t(), list(), t()) ::
  {:error, any()}
  | {:ok, %{optional(:result) => none()}}
  | {:disconnect, any(), %{env: any(), sock: {any(), any()}}}
  | {:error, Tds.Error.t(), %{pak_header: <<_::0>>, tail: <<_::0>>}}
  | {:ok, any(), %{result: any(), state: :ready}}
Link to this function

send_prepare(statement, params, s)

View Source
Link to this function

send_query(statement, s)

View Source
Link to this function

send_transaction(command, payload, s)

View Source