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

Geosearch #1560

Merged
merged 10 commits into from
Jul 2, 2013
Merged

Geosearch #1560

merged 10 commits into from
Jul 2, 2013

Conversation

ebensing
Copy link
Contributor

@ebensing ebensing commented Jul 1, 2013

Initial geoSearch support for Mongoose. Should work pretty similar to the way mapreduce does.

ebensing added 3 commits June 27, 2013 17:31
All tests passing and geoSearch works. Still need to cast the return
documents back into their models
also, updated the tests. everything now casts appropriately.
callback = options;
options = {};
}
if (!callback || 'function' != typeof callback) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could drop the !callback since the other check covers it.

var temp = res.results[i];
res.results[i] = new self();
res.results[i].init(temp, {}, function (err) {
if (err) return callback(err);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should guard against potentially calling the callback multiple times.

ebensing added 6 commits July 1, 2013 14:44
making sure that errors sent back to the user are `instanceof Error`
updated the tests to reflect the new way the errors are passed to the
user
aheckmann added a commit that referenced this pull request Jul 2, 2013
@aheckmann aheckmann merged commit 3439a25 into Automattic:master Jul 2, 2013
@aheckmann aheckmann deleted the geosearch branch July 2, 2013 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants