anchor.diff:        _ ->
           [Sql1, " LIMIT ", integer_to_list(Offset), ",", integer_to_list(Limit)]
       end,
  -  Query  = binary_to_list(iolist_to_binary(Sql2)),
  -  case execute(Query, State) of
  +  prepare(find_all, Sql2),
  +  case execute(find_all, State) of
       #result_packet{rows = Rows, field_list = Fields} ->
         Docs   = lists:foldl(
           fun(Row, DocList) ->
  
positive.code:     " WHERE ", escape(atom_to_list(sumo:field_name(sumo:get_id_field(DocName)))),
      "=? LIMIT 1"
    ],
    case execute(Sql, [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))],
    case execute(Sql, State) of
      #ok_packet{affected_rows = NumRows} -> {ok, NumRows, State};
      Error -> evaluate_execute_result(Error, State)
    end.
  
negative.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  %% Public API.
  -export([init/1]).
  -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]).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Types.
  