Emily Stark
83fde36e00
Fix hashed login token test failures caused by merge mishap.
release/sso-6
2014-01-02 18:23:56 -08:00
Emily Stark
b296dcbdf2
Merge remote-tracking branch 'origin/devel' into sso
...
Conflicts:
packages/accounts-base/accounts_server.js
release/sso-5
2014-01-02 17:46:01 -08:00
Emily Stark
fde0a90b9b
Add _noYieldsAllowed safety belts to Deps functions.
...
Because we want to start experimenting with using Deps.autorun on the
server.
2014-01-02 14:45:43 -08:00
Emily Stark
b44855d70d
Send user agent info with galaxy logins
2013-12-31 18:38:03 -08:00
David Glasser
cc7249985d
Merge branch 'minimongo-array-updates' into devel
...
Big minimongo refactoring. Lays the groundwork for trusting more
selectors in oplog and implementing the '$' option to updates, though
neither are yet implemented.
2013-12-31 13:58:27 -08:00
David Glasser
a5cd5eb435
add comment about sort vs query
2013-12-31 13:55:20 -08:00
David Glasser
e762fbc045
Finish reorganizing/renaming in selector.js
2013-12-31 13:51:36 -08:00
David Glasser
b80d0df736
Rename Minimongo.Selector -> Minimongo.Matcher
...
The idea will be that "selector" will always mean the EJSON
representation of a selector, and "matcher" will be some compiled
form (whether Minimongo.Matcher or the various lambdas that make it up)
2013-12-31 13:26:38 -08:00
David Glasser
e3c8bf65ab
Start to reorder/rename selector.js
2013-12-31 13:22:34 -08:00
David Glasser
2f9aecc77d
Improve lookup function docs and tests
2013-12-31 13:08:17 -08:00
David Glasser
5aa5a5c05e
Rename: makeLookupFunction, get rid of legacy one
2013-12-31 12:46:28 -08:00
David Glasser
87a71a9298
Use new lookup function directly in Sorter
2013-12-31 12:13:15 -08:00
David Glasser
3e6ef8580e
Can always implement $all-with-$elemMatch later
...
(It's an error now)
2013-12-31 12:00:16 -08:00
David Glasser
bea993e1cc
style
2013-12-31 00:13:04 -08:00
David Glasser
df3223cc05
Get rid of cursor._distance
...
Now selectors don't have a link to the internals of the cursor; instead,
Selector.documentMatches() return values can include a 'distance' field. (This is
the dress rehearsal for also adding an 'arrayIndex' field.)
Contexts that run selectors and may need to sort later now explicitly
keep around a distances IdMap. Specifically, the handles associated with
observeChanges calls each have a distances IdMap, and the _getRawObjects
call has a temporary one (which might alias one of the
observeChanges-related ones if it's being called from observeChanges,
either for the initial query or to re-compute).
2013-12-31 00:01:44 -08:00
David Glasser
9b9f34bb04
Refactor: compiled selector is a class
...
For now this just lets us do isGeoQuery as something other than
"reparse", but this should have some better effects later.
2013-12-30 16:04:09 -08:00
David Glasser
a2dba04d78
Move $near to the new model
...
Implement branching for $near (not quite the way Mongo does it, but
better than nothing)
That was the last $operator to be moved to the new model, so I could
delete a lot of obsolete stuff.
2013-12-30 16:04:09 -08:00
David Glasser
2cc3bf8635
move "no $near under $" check into compiler
2013-12-30 16:04:09 -08:00
David Glasser
a8d10b9a02
Refactor sort/$near distance stuff
...
Instead of having a semi-implicit dependency on the cursor, specify
distances explicitly when "instantiating" the comparator.
The next refactoring will remove _distance from cursor entirely.
2013-12-30 16:04:08 -08:00
David Glasser
60cd9a67ba
Move $all to the new model
...
Implement $all with regexps.
Note that $all with $elemMatch needs to be separately implemented. It's
an entirely different operation.
2013-12-30 16:04:08 -08:00
David Glasser
c71c5598db
Move $elemMatch into the new model
...
Support {x: {$elemMatch: {$gt: 5}}} syntax where the $elemMatch argument
is a "value selector" and not a "full doc selector".
2013-12-30 16:04:08 -08:00
David Glasser
1a8a45e6b9
Move $regex/$options to the new model
...
Better type-checking for $regex, and it's an error to provide $options
without $regex.
2013-12-30 16:04:08 -08:00
David Glasser
dafcd0d52c
Move $type to the new model
...
Requires another special option, yay.
2013-12-30 16:04:08 -08:00
David Glasser
a72c2b89a8
Move $exists to the new model
...
Fixes two incompatibilities:
- {$exists: false} did the wrong logic when there were multiple branches
(we (poorly) special-cased $not and $nin but not this negative case)
- No longer require the argument to $exists to be a boolean;
{$exists: 0} and {$exists: 1} should work, eg
2013-12-30 16:04:08 -08:00
David Glasser
38a9b08ff6
Move $size to the new model
2013-12-30 16:04:08 -08:00
David Glasser
d863883e9f
Move $nin to the new model
...
This implement regexp options for $in
Remaining:
- $exists
- $size
- $type
- $regex/$option
- $all
- $elemMatch
- $near/$maxDistance
2013-12-30 16:04:08 -08:00
David Glasser
90e94c8af1
Move $in to the new model
...
Implement regexp options for $in. Fixes #1707 .
Remaining:
- $nin
- $exists
- $size
- $type
- $regex/$option
- $all
- $elemMatch
- $near/$maxDistance
2013-12-30 16:04:08 -08:00
David Glasser
fdd16c6530
Move $ne to the new model.
...
Fixes an expect_fail
2013-12-30 16:04:08 -08:00
David Glasser
d243d30768
Move $not to the new model
2013-12-30 16:04:08 -08:00
David Glasser
20e1fba38c
Move $mod to the new model
2013-12-30 16:04:07 -08:00
David Glasser
366e5a5f68
Move $gt/$gte/$lte to the new model
2013-12-30 16:04:07 -08:00
David Glasser
bb85b79a5e
Refactor regexp match to use new style
...
Also implement regexp-vs-regexp matching, for completeness sake
2013-12-30 16:04:07 -08:00
David Glasser
75f1a6dc01
Implement $lt in the new model
...
Fix an invalid test
Don't run some $not/$lt tests, because $not is broken for now
2013-12-30 16:04:07 -08:00
David Glasser
ce54fa1d3b
Fix incorrect expect_fail tests
...
On further verification against MongoDB (and common sense), these young
expect_fail tests were actually correctly failing.
2013-12-30 16:04:07 -08:00
David Glasser
ef92b6c511
Two expect_fails now pass
2013-12-30 16:04:07 -08:00
David Glasser
61c51387a8
Major simplification to equality code
2013-12-30 16:04:07 -08:00
David Glasser
f617d6e6bc
Refactor equality to use new lookup function
2013-12-30 16:04:07 -08:00
David Glasser
f444571930
Refactor compileValueSelector
...
Pull out equality and regexp. Nothing else changes.
2013-12-30 16:04:07 -08:00
David Glasser
ff83533efd
compileValueSelector: remove unused argument
2013-12-30 16:04:07 -08:00
David Glasser
9a8d3c42c0
Add expect_fail test for an XXX comment
2013-12-30 16:04:07 -08:00
David Glasser
621fa164cd
Refactor logical ops; better error for non-object
2013-12-30 16:04:06 -08:00
David Glasser
92b2c80be5
Drop unused arg from logical operator compilation
2013-12-30 16:04:06 -08:00
David Glasser
6eac02e9bc
refactor: logical operators use structured return
2013-12-30 16:04:06 -08:00
David Glasser
2263cd49b4
Support "obj" name in $where
2013-12-30 16:04:06 -08:00
David Glasser
373413b550
Implement $comment
...
It's a top-level logical operator that is ignored.
2013-12-30 16:04:06 -08:00
David Glasser
466664c121
Minor refactoring in compileDocumentSelector
2013-12-30 16:04:06 -08:00
David Glasser
c85c70f071
refactor: _compileSelector results {result:bool}
...
instead of just a bool. This will give us room to add arrayIndex (and
perhaps to get the geoquery distance stuff into a better place).
This is just a very surface refactoring: it doesn't even extend to the
"value selectors" yet.
2013-12-30 16:04:06 -08:00
David Glasser
447a6b3e0d
Some updates to our NOTES file.
2013-12-30 16:04:06 -08:00
David Glasser
aea6d0cca9
Factor sort code into its own file.
2013-12-30 16:04:06 -08:00
David Glasser
c94760a0f4
Fix an old comment.
2013-12-30 16:04:06 -08:00