-
Notifications
You must be signed in to change notification settings - Fork 0
Query Syntax
Andrew Greenstreet edited this page Dec 12, 2018
·
1 revision
{
where : { column : {">":"value"}, //greater than column : {">=":"value"}, //greater than or equal to column : {"<":"value"}, //greater than or equal to column : {"==":"value"}, //equal to (also = ) column : {"!=":"value"}, //not equal to (also !) column : {"in":["value1","value2","value3"]}, //value is in array column : {"nin":["value1","value2","value3"]}, //value is not in array column : {"startWith":"Foo"}, //value stars with, sql equivalent ilike "Foo%"; column : {"contains":"Foo"}, //value contains, sql equivalent ilike "%Foo%"; column : {"endsWith":"Bar"}, //value ends with, sql equivalent ilike "%Bar"; or : [ //wrapper to allow for an or condition column : {">":"value"}, //greater than column : {">=":"value"}, //greater than or equal to ], and : [ column : {"==":"value"}, //greater than column : {"==":"value"}, //greater than or equal to ] }
}
json querying
“column.param1.param2” : {“==”:“value”}, //element will be returned as a discrete parameter in results
Limits
Internal Query
{ where : {.…}, limit : 100 }
HTTP Query
&limit=100
Offset
Internal Query
{ where : {.…}, offset : 100 }
HTTP Query
&offset=100
Order
Internal Query
{ where : {.…}, order : “column asc” }
HTTP Query
&order=column+asc
Join
Internal Query
{ where : {.…}, join : [‘relation1’,‘relation2’] }
HTTP Query
&join=relation1,relation2
Joins also support the where syntax
{ where : {.…}, join : { relation1 : { where : { column: {“==”,value} } } } }
Not yet supported via http