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

filter based on edge in()? #156

Open
grimace opened this issue Jan 5, 2017 · 0 comments
Open

filter based on edge in()? #156

grimace opened this issue Jan 5, 2017 · 0 comments

Comments

@grimace
Copy link

grimace commented Jan 5, 2017

I'm moving a sails application from mongo to orientdb. I'm using sails-orientdb and am trying to build a filter for a query. I'm trying to query only on Assets that are connected to a particular Network. I can do this:

    var edgeQuery =  "select from Asset where in(NET_ASSET).@rid = #3961:0 and width >= 1920"; 
    var query = dbclient.db.select(edgeQuery);
          return query.all()
                  .then(function (contents) {
                         ...etc..

which makes building my queries quite contorted since the number of parameters vary. I would like to do something like this:

    var filter = { "in(NET_USER).@rid" : "#3961:0", "width" : '>= 1920' };
    Asset.find(filter);

Then I could build my filter as needed, but so far I've had no luck.
Is it possible?

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

No branches or pull requests

1 participant