anchor.diff:    end.
   
   delete(DocName, Id, State) ->
  -  Sql = [
  +  StatementName = prepare(DocName, delete, fun() -> [
       "DELETE FROM ", escape(atom_to_list(DocName)),
       " WHERE ", escape(atom_to_list(sumo:field_name(sumo:get_id_field(DocName)))),
       "=? LIMIT 1"
  -  ],
  -  prepare(delete, Sql),
  -  case execute(delete, [Id], State) of
  +  ] end),
  +  case execute(StatementName, [Id], State) of
       #ok_packet{affected_rows = NumRows} -> {ok, NumRows > 0, State};
       Error -> evaluate_execute_result(Error, State)
     end.
   
   delete_all(DocName, State) ->
  -  Sql = ["DELETE FROM ", escape(atom_to_list(DocName))],
  -  prepare(delete_all, Sql),
  -  case execute(delete_all, State) of
  +  StatementName = prepare(DocName, delete_all, fun() ->
  +    ["DELETE FROM ", escape(atom_to_list(DocName))]
  +  end),
  +  case execute(StatementName, State) of
       #ok_packet{affected_rows = NumRows} -> {ok, NumRows, State};
       Error -> evaluate_execute_result(Error, State)
     end.
  
positive.code: -export([create_schema/2]).
  -export([persist/2]).
  -export([delete/3, delete_all/2]).
  -export([prepare/2, execute/2, execute/3]).
  -export([find_all/2, find_all/5, find_by/3, find_by/5]).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: create_index(_, _) ->
    none.
  
  %% @doc Call prepare/3 first, to get a well formed statement name.
  execute(Name, Args, #state{pool=Pool}) when is_atom(Name), is_list(Args) ->
    lager:debug("Executing Query: ~s -> ~p", [Name, Args]),
    emysql:execute(Pool, Name, Args).
  
  execute(Name, State) when is_atom(Name) ->
  