-
Notifications
You must be signed in to change notification settings - Fork 73
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
browser compatible #4
Comments
To make this easier, I think the actual querying should be left out of this repo (remove the mongodb dependency) and allow passing any object that implements the collection interface or even just having this library simply generate valid query objects. For example I have my own fork that returns an object with the final query/updateDoc/options, which I then pass to a component that converts simple queries to RESTful urls to use client-side |
sounds good to me |
Do you think it'd be better to return a query object or just have it so you pass a collection object to the library? |
that's actually how it works today. we just wrap the passed collection in a compatibility layer. We should break the layer out and define it so its easy to create other compat layers. |
so you need access to the fields/options etc? we could expose that. |
Right now if you override mquery.Collection we'll use that instead but it must conform to the mquery collection API. take a look at lib/collection |
Only problem with a browser version is That way you can just define polyfills for those types for the browser/mongoshell |
that sounds good for now. maybe nice to provide a clean env abstraction which provides the collection,objectid,readpref etc. |
No description provided.
The text was updated successfully, but these errors were encountered: