SQL Guides

OINO.cloud APIs support SQL where conditions using parameter oinoqueryfilter in the request URL. You can give filter conditions like (fieldName)-cond(value) to define a where condition.

Filter Conditions

The following filter conditions are supported:

  • lt: Less than.
  • le: Less or equal to.
  • eq: Equal to.
  • ne: Not equal to.
  • ge: Greater or equal to.
  • gt: Greater than.
  • like: Like (% can be used for wildcard).
Values are given without quotes and can't contain quotes or parentheses.

Null Checks

Use -isnull(fieldName) or -isNotNull(fieldName) to filter on SQL null values, e.g. -isnull(ShipRegion).

Combining Filters

Filters can be combined and negated by wrapping each part in parentheses:

  • and: Both conditions must match, e.g. ((UnitPrice)-gt(10))-and((UnitsInStock)-lt(5)).
  • or: Either condition matches, e.g. ((UnitPrice)-lt(5))-or((UnitPrice)-gt(50)).
  • not: Negates a filter, e.g. -not((ProductName)-like(A%)) or -not(-isnull(ShipRegion)).
Giving the oinoqueryfilter parameter multiple times in the URL combines the filters with and.

Example

ProductName UnitPrice UnitsInStock UnitsOnOrder