Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy queryset eval for Pickle #83

Merged
merged 3 commits into from May 12, 2014

Commits on Mar 12, 2014

  1. Copy the full SHA
    69bf703 View commit details
    Browse the repository at this point in the history
  2. fix simple queries tests to match Mongo semantics

     * The Pickle and Mongo backends disagreed on how .sort(), .limit(), and
       .offset() work together.  The tests were originally written to match
       the Pickle semantics, but it has been decided that going forwards,
       the Mongo semantics will hold sway.  Summary:
    
       * sort(), offset(), and limit() are now setters.  Successive calls to
         a function will overwrite the previous value.  No evaluation will
         be performed by these functions.  The underlying data will only be
         updated when __iter__, __getitem__, or __len__ is called.  E.g.
         Foo.find().limit(10).limit(15) will return 15 items.
    
       * The constraints are always processed in the same order regardless
         of the order in which they are declared.  sort()s are run first,
         then offset(), then limit(). E.g.
         Foo.find().limit(10).offset(5).sort("_id") will sort first, then
         apply the offset, then limit the returned results to 10.
    felliott committed Mar 12, 2014
    Copy the full SHA
    f94aa5f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    ec5bc4c View commit details
    Browse the repository at this point in the history