Operators

This page provides an overview of all operators available in the View query language. Operators are special symbols or keywords that perform operations on values and return results.

Comparison Operators

Comparison operators compare values and return boolean results.

Operator Description Example

=

Equals

name = 'John'

!=

Not equals

category != 'Electronics'

>

Greater than

price > 100

>=

Greater than or equal to

price >= 100

<

Less than

price < 50

Less than or equal to

price ⇐ 50

IS NULL

Tests if a value is NULL (missing)

phoneNumber IS NULL

IS NOT NULL

Tests if a value is not NULL (present)

email IS NOT NULL

Logical Operators

Logical operators combine boolean expressions.

Operator Description Example

AND

Logical AND - true if both conditions are true

category = 'Books' AND price < 20

OR

Logical OR - true if either condition is true

category = 'Books' OR category = 'Magazines'

NOT

Logical NOT - negates a condition

NOT price > 100

Set Membership Operators

Set membership operators check if a value is part of a set.

Operator Description Example

IN

Tests if a value matches any value in a list

category IN ('Books', 'Magazines', 'Comics')

= ANY

Tests if a value matches any element in an array

tag = ANY(tags) or :tag = ANY(tags)

Pattern Matching Operators

Pattern matching operators test if a string matches a pattern.

Operator Description Example

LIKE

Pattern matching with wildcards

name LIKE 'Jo%'

Operator Precedence

Operators are evaluated in the following order of precedence (from highest to lowest):

  1. Parentheses ()

  2. Unary operators (NOT)

  3. Comparison operators (=, !=, <, >, etc.)

  4. AND

  5. OR

Use parentheses to override the default precedence.

  • WHERE clause - Using operators in query filters

  • JOIN - Using operators in join conditions

  • Data Types - Type information for operators