anchor.diff:      end,
       Sql2
     end),
  -  case execute(StatementName, [atom_to_list(OrderField), Offset, Limit], State) of
  +  ExecArgs =
  +    case Limit of
  +      0 -> [atom_to_list(OrderField)];
  +      Limit -> [atom_to_list(OrderField), Offset, Limit]
  +    end,
  +  case execute(StatementName, ExecArgs, State) of
       #result_packet{rows = Rows, field_list = Fields} ->
         Docs   = lists:foldl(
           fun(Row, DocList) ->
  
positive.code:   end.
  
  delete_by(DocName, Conditions, State) ->
    StatementName = prepare(DocName, delete_by, fun() -> [
      "DELETE FROM ", escape(atom_to_list(DocName)),
      " WHERE ",
      [[escape(atom_to_list(K)), "=?"] || {K, _V} <- Conditions]
  
negative.code:     end,
      Sql2
    end),
    ExecArgs =
      case Limit of
        0 -> Values;
        Limit -> lists:flatten([Values|[Offset, Limit]])
      end,
  
    case execute(StatementName, ExecArgs, State) of
      #result_packet{rows = Rows, field_list = Fields} ->
        Docs = lists:foldl(
          fun(Row, DocList) ->
  