Diffusion Apple API  6.1.5
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Functions Variables Properties Pages
Session filters

Session filters are a mechanism for accessing sessions by means of a query expression. For example, it is possible to send a message to all sessions that satisfy a specified filter. Filters are parsed and evaluated at the server.

A session filter query consists of either:

  1. a single search clause - e.g. Department is "Accounts"
  2. or multiple search clauses connected by boolean operators - e.g. Department is "Payroll" and Status is "Closed"

Search clauses may be linked by the boolean operators and or or, where and takes precedence over or. Parentheses may be used to override the precedence as follows:

(Department is "Accounts" or Department is "Payroll") and Status is "Closed"

The boolean not operator may be used to negate the following clause:

not Department is "Payroll"

or an expression within parentheses:

not (Department is "Payroll" or Department is "Accounts")

A search clause takes the form key operator value, where:

Only string values are currently supported and must be enclosed within either single or double quotes. Special characters (", ' or \) may be included within the value by preceding with the escape character \). The convenience method PTDiffusionEscape can be used to insert escape characters into a value.

Supported operators are as follows:

All operators are case insensitive.

The following are examples of valid expressions: