anchor.diff:  
   find_all(DocName, OrderField, Limit, Offset, State) ->
     % Select * is not good...
  -  Sql0 =
  -    ["SELECT * FROM ", escape(atom_to_list(DocName)), " "],
  -  Sql1 =
  -    case OrderField of
  -      undefined ->
  -        Sql0;
  -      _ ->
  -        [Sql0, " ORDER BY ", escape(atom_to_list(OrderField)), " "]
  -    end,
  -  Sql2 =
  -    case Limit of
  -      0 ->
  -        Sql1;
  -      _ ->
  -        [Sql1, " LIMIT ", integer_to_list(Offset), ",", integer_to_list(Limit)]
  -    end,
  -  prepare(find_all, Sql2),
  -  case execute(find_all, State) of
  +  StatementName = prepare(DocName, find_all, fun() ->
  +    Sql0 = ["SELECT * FROM ", escape(atom_to_list(DocName)), " "],
  +    Sql1 = case OrderField of
  +      undefined -> Sql0;
  +      _ -> [Sql0, " ORDER BY ", escape(atom_to_list(OrderField)), " "]
  +    end,
  +    Sql2 = case Limit of
  +      0 -> Sql1;
  +      _ -> [Sql1, " LIMIT ", integer_to_list(Offset), ",", integer_to_list(Limit)]
  +    end,
  +    Sql2
  +  end),
  +  case execute(StatementName, State) of
       #result_packet{rows = Rows, field_list = Fields} ->
         Docs   = lists:foldl(
           fun(Row, DocList) ->
  
positive.code: create_index(_, _) ->
    none.
  
  execute(PreName, Args, #state{pool=Pool}) when is_atom(PreName), is_list(Args) ->
    Name = list_to_atom(atom_to_list(PreName) ++ "_stmt"),
    lager:debug("Prepared Query: ~s -> ~p", [Name, Args]),
    emysql:execute(Pool, Name, Args).
  
  execute(Name, State) when is_atom(Name) ->
  
negative.code: %% XXX We should have a DSL here, to allow querying in a known language
  %% to be translated by each driver into its own.
  find_by(DocName, Conditions, Limit, Offset, State) ->
    Values = [V || {_K, V} <- Conditions],
    StatementName = prepare(DocName, find_by, fun() ->
      Sqls = [[escape(atom_to_list(K)), "=?"] || {K, _V} <- Conditions],
      % Select * is not good.. 
      Sql1 =[
        "SELECT * FROM ", escape(atom_to_list(DocName)),
        " WHERE ", string:join(Sqls, " AND ")
      ],
      Sql2 = case Limit of
        0 -> Sql1;
        _ -> [Sql1|[" LIMIT ", integer_to_list(Offset), ",", integer_to_list(Limit)]]
      end,
      Sql2
    end),
    case execute(StatementName, Values, State) of
      #result_packet{rows = Rows, field_list = Fields} ->
        Docs = lists:foldl(
          fun(Row, DocList) ->
  