dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

Query condition objects #702

Closed nickythorne closed 8 years ago

nickythorne commented 8 years ago

Hello,

Reading through the documentation, I'm interested in the custom conditions you can supply to the find object. The documentation mentions the orm.lt, orm.gte helper functions in order to generate the appropriate conditions.

Would it be possible to compose these conditions directly within the condition object itself? For example:

{
    "age" : {
       "gt" : 20 
    }
}

Or do I have to manually construct the object to achieve this?

Thanks.

dxg commented 8 years ago

Manually.

nickythorne commented 8 years ago

Ok.. and are these conditions supported for all data sources, or just SQL?

Scratch that, just checked the codebase - they are..

Cheers.