Option to disable manipulators for Collection.find

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      Both Collection.insert and Collection.update provide a named parameter to disable manipulators: "manipulate=False".
      This option should also be available for the "find" method.

      Going into implementation details: when "manipulate" is set to False the code for Cursor.next can be simplified to:

      def next(self):
      if not self.__empty:
      if len(self.__data) or self._refresh():
      return self.__data.pop(0)
      raise StopIteration

      Cursor._init_ could switch between both implementations of "next" according to the value of "manipulate".

              Assignee:
              Bernie Hackett
              Reporter:
              unbeknownst
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: