Files
meteor/docs/client
David Glasser b5a0613f85 Remove cursor.rewind interface
Our cursor interface has no nextObject method, so there's no point in
having a rewind method. Its major effect is ensuring that
fetch/forEach/map return no documents if you've already called one of
them once. It's not clear why this is actually useful to anybody.

rewind is kept around as a no-op; if we later implement nextObject, we
can make rewind do something, but we still presumably would auto-rewind
before fetch/forEach/map.

In minimongo, remove the db_objects cache inside each cursor. The only
actual use of this cache was that if you called count multiple times, it
would return the same number without re-running the query, and you could
share the query work between N calls to count and one call to
fetch/forEach/map (but only one call! future calls would return
nothing!)  While there's a minor performance hit from getting rid of
this cache, it should also use a little less memory, and enable use
cases like

   {{#with someCursor}}
     {{#if count}}
        {{#each this}}
          ...
        {{/each}}
     {{/if}}
   {{/with}}

which didn't work before because even the deps invalidation didn't
rewind the cursor.

Also, as a minor optimization, skip an EJSON.clone if there's a
projection, because projection functions are guaranteed to clone.

Fixes #2114
2014-06-05 13:18:51 -07:00
..
2014-06-05 13:18:51 -07:00
2014-06-05 13:18:51 -07:00
2014-05-08 18:00:35 -07:00
2014-05-22 12:10:26 -07:00
2014-04-24 13:45:55 -07:00
2014-04-24 13:45:55 -07:00
2014-06-05 13:18:51 -07:00
2013-04-01 14:29:16 -07:00