anchor.diff:                     {ok,{[field()],[term()],result()},protocol()}|{error,_,protocol()}.
   real_query(#protocol{handle=H}=P, Query)
     when undefined =/= H, is_binary(Query) ->
  -    L = [fun real_query_pre/2, fun send/2, fun recv_status/1, fun real_query_post/2],
  -    loop(P, [Query], L).
  +    loop([Query,P], [fun real_query_pre/2, fun send/2, fun recv_status/1, fun real_query_post/2]).
   
   -spec refresh(protocol(),integer()) -> {ok,result(),protocol()}|{error,_,protocol()}.
  -refresh(#protocol{handle=H}=P, Options)
  +refresh(#protocol{handle=H}=P, Option)
     when undefined =/= H ->
  -    L = [fun refresh_pre/2, fun send/2, fun recv_status/1, fun recv_result/2],
  -    loop(P, [Options], L).
  +    loop([Option,P], [fun refresh_pre/2, fun send/2, fun recv_status/1, fun recv_result/2]).
   
   -spec select_db(protocol(),binary()) -> {ok,result(),protocol()}|{error,_,protocol()}.
   select_db(#protocol{handle=H}=P, Database)
     when undefined =/= H, is_binary(Database) ->
  -    L = [fun select_db_pre/2, fun send/2, fun recv_status/1, fun recv_result/2],
  -    loop(P, [Database], L).
  +    loop([Database,P], [fun select_db_pre/2, fun send/2, fun recv_status/1, fun recv_result/2]).
   
   -spec stmt_prepare(protocol(),binary()) -> {ok,prepare(),protocol()}|{error,_,protocol()}.
   stmt_prepare(#protocol{handle=H}=P, Query)
     when undefined =/= H, is_binary(Query) ->
  -    L = [fun stmt_prepare_pre/2, fun send/2, fun recv_status/1, fun stmt_prepare_post/2],
  -    loop(P, [Query], L).
  +    loop([Query,P], [fun stmt_prepare_pre/2, fun send/2, fun recv_status/1, fun stmt_prepare_post/2]).
   
   -spec stmt_close(protocol(),prepare()) -> {ok,undefined,protocol()}|{error,_,protocol()}.
   stmt_close(#protocol{handle=H}=P, #prepare{}=X)
     when undefined =/= H ->
  -    L = [fun stmt_close_pre/2, fun send/3, fun stmt_close_post/2],
  -    loop(P, [X], L).
  +    loop([X,P], [fun stmt_close_pre/2, fun send/3, fun stmt_close_post/2]).
   
   -spec stmt_execute(protocol(),prepare(),[term()])
                     -> {ok,prepare(),protocol()}|
                        {ok,{[field()],[term()],prepare()},protocol()}|{error,_,protocol()}.
   stmt_execute(#protocol{handle=H}=P, #prepare{param_count=N}=X, Args)
     when undefined =/= H, is_list(Args), N == length(Args) ->
  -    L = [fun stmt_execute_pre/3, fun send/3, fun recv_status/2, fun stmt_execute_post/3],
  -    loop(P, [X,Args], L).
  +    loop([X,Args,P], [fun stmt_execute_pre/3, fun send/3, fun recv_status/2, fun stmt_execute_post/3]).
   
   -spec stmt_fetch(protocol(),prepare())
                   -> {ok,prepare(),protocol()}|
  
positive.code: send(Term, Binary, #protocol{handle=H,compress=Z}=P) ->
      case myer_network:send(H, Binary, Z) of
  	{ok, Handle} ->
  	    {ok, [Term], replace(P,Handle)};
  	{error, Reason, Handle} ->
  	    {error, Reason, replace(P,Handle)}
      end.
  
negative.code: -spec stmt_reset(protocol(),prepare()) -> {ok,prepare(),protocol()}|{error,_,protocol()}.
  stmt_reset(#protocol{handle=H}=P, #prepare{}=X)
    when undefined =/= H ->
      loop([X,P], [fun stmt_reset_pre/2, fun send/3, fun recv_status/2, fun stmt_reset_post/3]).
  
  -spec next_result(protocol())
                   -> {ok,result(),protocol()}|
                      {ok,{[field()],[term()],result()},protocol()}|{error,_,protocol()}.
  next_result(#protocol{handle=H}=P)
    when undefined =/= H ->
      loop([P], [fun next_result_pre/1, fun recv_status/1, fun real_query_post/2]).
  
  -spec stmt_next_result(protocol(),prepare())
                        -> {ok,prepare()}|{ok,[field()],[term()],prepare(),protocol()}|{error,_, protocol()}.
  stmt_next_result(#protocol{handle=H}=P, #prepare{}=X)
    when undefined =/= H ->
      loop([X,P], [fun stmt_next_result_pre/2, fun recv_status/2, fun stmt_next_result_post/3]).
  
  
  %% == protected ==
  
  -spec binary_to_float(binary(),non_neg_integer()) -> float().
  binary_to_float(Binary, _Decimals) ->
      try binary_to_float(Binary)
      catch
          _:_ ->
              try binary_to_integer(Binary) of
                  I ->
                      I * 1.0
              catch
  