Filters

filterObject

A filterObject looks like this:

var filterObj = {
   "db_column_name" : { "values": value, "operator": operator_string }
}
value
list or string
operator_string
string that determines the database query

Example:

var filters = {
   "color": {"values" : "red", "operator":"!=" }
       "number": {"values": [2,3], "operator": "either_="}
}

anyclusterInstance.filter(filters);

This will result in the following query:

WHERE color != red AND (number=2 OR number=3)

Note

filterObjects are ANDed together. For OR lookups use the either_ operator.

Operators

  • = (default)
  • !=
  • >=
  • <=
  • >
  • <
  • contains
  • startswith
  • either_[operator]

If the value is a list, the operator can be prefixed with “either_” to apply to each item of the list.