Specifically, we can now detect if a selector matches at most a fixed set of
IDs (instead of just "at most one ID"), both for queries and for writes. This
includes every write made from the client on a restricted collection!
Specifically, updates and removes that specify a specific _id, and all inserts,
should not require live queries that specify a specific different _id to poll.
This involves changing the InvalidationCrossbar matching semantics. I suspect
that a future version of the InvalidationCrossbar may want the old semantics, if
the notifications it is receiving are more oplog-driven than command-driven, but
this will work for now.
Also, make the O(1) optimization on minimongo remove("id") actually work.
Previously it was declawed by the fact that Meteor.Collection.remove normalizes
to {_id: "id"}.
This is a 0.5.5 regression (with the new selector compiler): the new compiler
handled selectors with "a.b.c" reasonably well if the "c" level contained an
array but not if the "a" or "b" levels did.
This also implements mostly-Mongo-compatible behavior for sorting when arrays
are involved; this is not an 0.5.5 regression, since the old compiler did not
get this right.
Patch by: Ted Blackman <ted.blackman@gmail.com>
(Ted fixed a bug on devel that was preventing these tests from passing. On the
ddp-pre1 branch, the bug was fixed in a different way, but the tests are still
useful.)
Allows packages such as stream and accounts to declare URL prefixes
such as /sockjs/ and /_oauth/ to be network routes.
Updates server to avoid serving app HTML on network routes.
Checks for conflict between files in public/ and network routes. For
example, the developer might not know that /sockjs/ is reserved, and
might create a file "public/sockjs/socks-are-great.png".
- Delete dead EJSON._each2.
- Make OrderedDict.remove throw if the key isn't in it.
- Make changed callbacks in two places throw if the document isn't in the
dictionary. (Other callbacks implicitly throw via OrderedDict.)
- Remove OrderedDict.pop (which didn't return the key) and push.
Inspired by a pull request from tmeasday (though we've changed the underlying
code enough on ddp-pre1 that I had to rewrite it myself).
Use it in todos. No docs yet, but the Meteor.subscribe docs are already
scheduled for some attention.
Note that sub.stop() is now handled by the client (it removes the record of the
subscription) but there is no way for an app to observe this. (I expect we'll
use sub.stop() in implementing "fetch" in the Mongo connector.)