anchor.diff:           exec_prepared_select/3]).
   
   -record(state, {cn,
  -                statements = dict:new() }).
  +                statements = dict:new() :: dict() }).
  +
  +-type connection() :: pid().
  +-type state() :: any().
   
   start_link(Config) ->
       sqerl_client:start_link(?MODULE, Config).
   
  +-spec exec_prepared_select(atom(), [], state()) -> {{ok, [[tuple()]]} | {error, any()}, state()}.
   exec_prepared_select(Name, Args, #state{cn=Cn, statements=Statements}=State) ->
  -    {Columns, Stmt} = dict:lookup(Name, Statements),
  +    {Columns, Stmt} = dict:fetch(Name, Statements),
       ok = pgsql:bind(Cn, Stmt, Args),
       %% Note: we might get partial results here for big selects!
       case pgsql:execute(Cn, Stmt, Args) of
  
positive.code:             {{error, Result}, State}
      end.
  
  exec_prepared_statement(Name, Args, #state{cn=Cn}=State) ->
      ok = pgsql:bind(Cn, Name, Args),
      %% Note: we might get partial results here for big selects!
      case pgsql:execute(Cn, Name, Args) of
          {ok, Count} -> 
              {{ok, Count}, State};
          Result ->
  
negative.code:             load_statements(Connection, T, dict:store(Name, {Columns, Statement}, Dict));
          Error ->
              %% TODO: Discover what errors can flow out of this, and write tests.
              {error, Error}
      end.
  
  %% Converts contents of result_packet into our "standard"
  