Code now calls addedAt, etc. on ordered observes.
Not yet changed to autodetect observe orderedness by method names.
Tests pass. Have not changed examples yet, nor docs.
This is a complete rewrite of the Minimongo selector and sort compiler to no
longer use eval, started by @Ed-von-Schleck and finished by @glasser. It makes
the code more readable and no longer requires all queryable types to be
serializable in an eval-able way; the latter will be useful once the in-process
EJSON work on the ddp-pre1 branch is ready.
(It also makes selector compilation faster, though selector evaluation appears
to be very slightly slower.)
It uses an orderedDict instead of an array, and also this new version happens to
not do a ton of splices, which might help with performance in cases for really
large numbers of items. Anyway, introduced a dependency on LocalCollection;
will break that soon.
- Improve regex match against array.
- Improve matching of explicit deep nulls.
- Instead of doing a high-level "catch TypeError", do more explicit
type checks.
- Clone the selector (since we're going to save a reference in our
closure).
This callback receives any terminating error from a subscription. Currently this
can only be because the subscription is unknown, but soon subscriptions will be
able to send other errors.
Also, adjust the semantics of ready callbacks in a reactive context to only call
the latest instance of the callback rather than all callbacks.
Accomplish this in two ways:
- Explicitly making sure not to restart the timer on disconnected streams.
- Run the "restart heartbeat" code before processing incoming messages,
not after, since even the "failed" message that caused a disconnect
was running the "restart heartbeat" code.
Now don't require _id to be unset on insert anymore.
Some error handling around duplicate _id
Conflicts:
packages/minimongo/minimongo.js
packages/mongo-livedata/collection.js
packages/mongo-livedata/mongo_livedata_tests.js
Now users can put _id into their documents prior to insert, and insert() will
respect that. This is useful if you want to write any Meteor Method that inserts
documents -- it allows you to have the same ID on both client and server, so you
don't get flicker when the server document wins