Skip to content

Commit

Permalink
update typespec for handle funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Blowers committed Aug 24, 2017
1 parent aba20e1 commit ada1eb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mssqlex/protocol.ex
Expand Up @@ -107,8 +107,9 @@ defmodule Mssqlex.Protocol do

@doc false
@spec handle_begin(opts :: Keyword.t, state) ::
{:ok, result, state}
| {:error | :disconnect, Exception.t, state}
{:ok, result, state} |
{DBConnection.status, state} |
{:error | :disconnect, Exception.t, state}
def handle_begin(opts, state) do
case Keyword.get(opts, :mode, :transaction) do
:transaction -> handle_transaction(:begin, opts, state)
Expand All @@ -119,6 +120,7 @@ defmodule Mssqlex.Protocol do
@doc false
@spec handle_commit(opts :: Keyword.t, state) ::
{:ok, result, state} |
{DBConnection.status, state} |
{:error | :disconnect, Exception.t, state}
def handle_commit(opts, state) do
case Keyword.get(opts, :mode, :transaction) do
Expand All @@ -130,6 +132,7 @@ defmodule Mssqlex.Protocol do
@doc false
@spec handle_rollback(opts :: Keyword.t, state) ::
{:ok, result, state} |
{DBConnection.status, state} |
{:error | :disconnect, Exception.t, state}
def handle_rollback(opts, state) do
case Keyword.get(opts, :mode, :transaction) do
Expand Down

0 comments on commit ada1eb7

Please sign in to comment.