The SQL = and != operators are supported in read, update and delete requests on any columns in query parameters (row selectors) in the GET by Query, PUT by Query and DELETE by Query methods.
Examples
To match on a string literal beginning with !, escape it with a backslash as in \!string. For example, to match the title on the string '!bang-bang-dead', prefix with a URL encoded backslash title=%5C!bang-bang-dead. For Java API usage, prefix the value in a NameValuePair object with the unencoded operator.
Include '%' in anywhere in the query parameter value for the SQL match any wildcard. URL encode % as
%25
. This will use the a SQL LIKE instead of equals. For example to find all actors with first names that start with 'Ja', use
first_name=Ja%25
. If the selector value has an actual percent, then it must be escaped with a backslash, and both must be URL encoded. For example, to select rows with the description of 'modified%', use
description=modified%5C%25
.
The wildcard is supported in read, update and delete requests on any columns in query parameters (row selectors) in the GET by Query, PUT by Query and DELETE by Query methods.
The SQL IS NULL and IS NOT NULL operators are supported in read, update and delete requests on any columns in query parameters (row selectors) in the GET by Query, PUT by Query and DELETE by Query methods.
Examples
To match on the actual literal 'null', escape it with a backslash as in \null. In a query parameter you must URL encode it as %5Cnull. For example, the title=%5Cnull find rows with title matching the string 'null'. Likewise to match on the literal '!null' use \!null, or URL encoded as %5C!null. For Java API usage, prefix the value in a NameValuePair object with the unencoded operator.
The null version is also supported in form parameters in POST with form (URL Encoded) and PUT by Query methods. This is used to set a column value to null in an insert or update. Again for the literals 'null' use the backslash escape as above. Likewise the form parameter literal '!null' must also be escaped as above.
Comparison operators are supported in read requests on numeric, date and string parameters by prefixing the mathematical symbol in the value. This is used in the GET by Query, PUT by Query and DELETE by Query methods.
The following operators are supported:
Operator | Symbol | URL Encoded Symbol | Example | URL Encoded Example |
---|---|---|---|---|
Greater than | > | %3E | price > 100 | price=%3E100 |
Greater than or equal to | >= | %3E%3D | price >= 100 | price=%3E%3D100 |
Less than | < | %3C | price < 200 | price=%3C200 |
Less than or equal to | <= | %3C%3D | price <= 200 | price=%3C%3D200 |
Ranges will be supported by specifying the parameter twice, as in:
To use a literal < or > as the first character in a parameter value, you must escape it with a URL encoded backslash (%5C). For example, the
title=%5C%3Chello
find rows with title matching '<hello' (encode as '\<hello').
HTTP Status Code 400 (InvalidRequestException) will returned to the requestor if a parameter is supplied:
Multiple parameters will be ANDed in the SQL. No ORing will be supported.
For Java API usage, prefix the value in a NameValuePair object with the unencoded operator. Zero or more of these are passed in a
List
of parameters when creating a Request object with the Factory.
The SQL IN operator is supported in read requests on numeric, date and string parameters by enclosing a comma-separated list in parenthesis. This is used in the GET by Query, PUT by Query and DELETE by Query methods.
Examples
To use a literal '(' as the first character in a parameter value, you must escape it with a URL encoded backslash (%5C). For example, the title=%5C(hello find rows with title matching the string '(hello'. For Java API usage, prefix the value in a NameValuePair object with the unencoded operator. Zero or more of these are passed in a
List
of parameters when creating a Request object with the Factory.