Skip to content

Commit

Permalink
add debug logger
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Mar 22, 2019
1 parent 4dac949 commit eb9aeac
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/firebirdex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule Firebirdex.Protocol do

@impl true
def handle_prepare(%Query{} = query, _opts, state) do
Logger.debug "handle_prepare()"
Logger.debug "handle_prepare() #{query}"
{:ok, conn, stmt} = :efirebirdsql_protocol.allocate_statement(state.conn)
case :efirebirdsql_protocol.prepare_statement(to_string(query), conn, stmt) do
{:ok, conn, stmt} ->
Expand Down Expand Up @@ -107,15 +107,12 @@ defmodule Firebirdex.Protocol do
case Keyword.get(opts, :mode, :transaction) do
:transaction when status == :idle ->
{:ok, conn} = :efirebirdsql_protocol.begin_transaction(false, conn)
Logger.debug "handle_begin() 1"
{:ok, %Result{}, %__MODULE__{conn: conn, transaction_status: :transaction}}
:savepoint when status == :transaction ->
# TODO: savepoint
{:ok, conn} = :efirebirdsql_protocol.begin_transaction(false, conn)
Logger.debug "handle_begin() 2"
{:ok, %Result{}, %__MODULE__{conn: conn, transaction_status: :transaction}}
mode when mode in [:transaction, :savepoint] ->
Logger.debug "handle_begin() 3"
{status, s}
end

Expand Down

0 comments on commit eb9aeac

Please sign in to comment.