Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Comparison Predicate

Where Predicate Grooper.CMIS

Specifies search criteria for an individual property in a CMISQL Query, using a comparison between the property value and a constant.

Remarks

A Comparison Predicate is used in the WHERE clause of a CMISQL Query to filter results based on the value of a specific property. The predicate takes the form:

PropertyName Operator Value
  • PropertyName is the query name of the property to compare.
  • Operator is one of several supported comparison operators.
  • Value is the constant value to compare against.

Valid Operators

The following operators are supported, depending on the property type:

Operator Description Comments
= Equal to Valid on all property types.
<> Not equal to Valid on all property types.
< Less than Numeric and date/time types only.
> Greater than Numeric and date/time types only.
<= Less than or equal to Numeric and date/time types only.
>= Greater than or equal to Numeric and date/time types only.
LIKE Contains a substring String types only. See below.
IS IS NULL or IS NOT NULL Valid on all property types.

Examples by Property Type

Property Type Supported Operators Quoted Example
String =, <>, LIKE, IS Yes vendor_name LIKE '%acme%'
Decimal =, <>, <, <=, >, >=, IS No invoice_amount <= 1000.00
Integer =, <>, <, <=, >, >=, IS No quantity = 0
Boolean =, IS No tax_exempt = true
DateTime =, <>, <, <=, >, >=, IS Yes invoice_date < '01/01/2018'
ID =, <>, IS Yes type_id='2fadac71-a9a9-4185-9070-e3b23517e518'
URI =, <>, LIKE, IS Yes vendor_website LIKE 'http://www.grooper.com/%'

LIKE Operator

The LIKE operator is used to match property values containing a substring. It takes the form:

PropertyName LIKE 'Expression'
  • Expression is a string literal using '%' and '_' as wildcards.
    • '%' matches zero or more characters.
    • '_' matches exactly one character.
  • LIKE is not case sensitive.
  • A LIKE expression with no wildcards is equivalent to '='.

Examples:

  • 'grooper%' matches values beginning with "grooper".
  • '%grooper' matches values ending with "grooper".
  • 'grooper%review' matches values beginning with "grooper" and ending with "review".

Note: Some CMIS Bindings may have limited support for LIKE expressions. For example:

  • Some only support '%' at the beginning or end.
  • Some do not support the "ends with" form (e.g., '%grooper').
  • Some do not support the '_' wildcard.

Comparison Predicate is typically configured by selecting a property, choosing an appropriate operator, and specifying a value. The available operators and value requirements depend on the data type of the selected property. This predicate is a core building block for filtering results in CMISQL Query objects.

Properties

NameTypeDescription

Used By

Notification