Skip to content

filter based on edge in()? #156

@grimace

Description

@grimace

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions