CodamAIDocs
Topicdone

All filter operators

EQ, NEQ, LIKE, IN, ISNULL, ISNOTNULL, BEFORE, AFTER, SAMEORBEFORE, SAMEORAFTER, MEMBEROF: what each one means, which field types it applies to and how the value is written.

Variants
EQNEQLIKEIN (comma-separated string)ISNULLISNOTNULLBEFOREAFTERSAMEORBEFORESAMEORAFTERMEMBEROFoperator does not fit the field type

What this is about

A filter has three parts:

{ "key": "amount", "value": "10", "param": "SAMEORAFTER" }
PartMeaning
keythe field, also across relations like company.companyname, see Filtering and sorting across relations
valuethe value to compare with, always as text, also for numbers and dates
paramthe operator: how the comparison works. If it is missing, LIKE applies

Operators are written in upper case. "eq" is not a valid operator.

The operators

Operatorreads asSQL (simplified)Example
EQequal={ "key": "city", "value": "Köln", "param": "EQ" }
NEQnot equal<>{ "key": "status", "value": "CLOSED", "param": "NEQ" }
LIKEmatches patternLIKE{ "key": "name", "value": "Muster%", "param": "LIKE" }
INone ofIN (…){ "key": "amount", "value": "5,10,15", "param": "IN" }
ISNULLhas no valueIS NULL{ "key": "note", "param": "ISNULL" }
ISNOTNULLhas a valueIS NOT NULL{ "key": "note", "param": "ISNOTNULL" }
BEFOREless than, before<{ "key": "dueOn", "value": "2026-02-01", "param": "BEFORE" }
SAMEORBEFOREless than or equal<={ "key": "amount", "value": "10", "param": "SAMEORBEFORE" }
AFTERgreater than, after>{ "key": "amount", "value": "10", "param": "AFTER" }
SAMEORAFTERgreater than or equal>={ "key": "dueOn", "value": "2026-02-01", "param": "SAMEORAFTER" }
MEMBEROFlist containsEXISTS (…){ "key": "employees", "value": "7f3…", "param": "MEMBEROF" }

BEFORE, AFTER and their SAMEOR… variants are named after time, but they work the same way for numbers.

Which operator for which field?

Operator × field type
TextIntegerDecimal numberYes/NoDate, timeIDEnumListOperator
yesyesyesyesyesyesyes–EQ, NEQ
yesnononononono–LIKE
yesyesyesyesyesyesyes–IN
noyesyesnoyesnono–BEFORE, AFTER, SAMEORBEFORE, SAMEORAFTER
yesyesyesyesyesyesyes–ISNULL, ISNOTNULL
–––––––yesMEMBEROF

“Integer” means fields of type Integer and Long, “Decimal number” means fields of type Double, Float and Decimal. “ID” means the id of an object and paths like company.id. ISNULL and ISNOTNULL also work on a single reference: { "key": "company", "param": "ISNULL" } finds all employees without a company.

How the value is written

Field typeHow to write valueExample
Textas it is"Köln"
Integerdigits"10"
Decimal numberwith a dot"2.5"
Yes/No"true" or "false" (upper/lower case does not matter)"true", "false"
Date, timefixed format"2026-02-10", "2026-02-10 08:00:00", see Date and time values
IDUUID"7f3a…-…"
Enumname of the value"OPEN"
INvalues separated by commas, without spaces"5,10,15"
ISNULL, ISNOTNULLno value needed–

All operators in action

Examples on the model preset (label, amount, ratio, active, dueOn, note)

When: exactly one value, or everything except one value

{ "key": "amount", "value": "10", "param": "EQ" } finds all with amount 10. NEQ finds all others, but not the ones without a value: in SQL an empty field is neither equal nor not equal.

Result: Exact comparison.

When: text search with placeholders

CDMS does not add any %. Everything about it is under Search patterns with LIKE: % and _.

Result: Only for text fields.

When: one of several values

{ "key": "label", "value": "Alpha,Beta", "param": "IN" }. The values are split at the comma, spaces are part of the value: "Alpha, Beta" searches for “Alpha” and “ Beta” (with a space).

Result: Matches whose value is in the list.

When: number and date ranges

For a range you combine two filters in an AND group, e.g. SAMEORAFTER 2026-01-01 and BEFORE 2026-02-01 for “in January”.

Result: Values in this range.

When: field empty or filled

value is not needed. { "key": "note", "param": "ISNULL" } finds all without a note.

Result: Empty means null in the database. An empty text "" is not null.

When: “which companies have this employee?”

Only for list fields. Separate page: Searching collections with MEMBEROF.

Result: Objects whose list contains the value.

When operator and field do not fit together

What happens with a filter that does not fit?
CaseExampleResult
comparison on text or yes/nolabel BEFORE Beta400 unsupported-operator|label|BEFORE
unknown fieldlable EQ Beta400 unknown-search-key|lable
unknown enum value with EQ/NEQtype EQ BOSS400 wrong-value-in-where|type|BOSS
yes/no with another wordactive EQ yes400 wrong-value-in-where|active|yes
LIKE on a numberamount LIKE 1%400 like-needs-text|amount
value does not fit the typeamount EQ abc400 wrong-value-in-where|amount|abc
MEMBEROF on a non-listlabel MEMBEROF x400 memberof-needs-collection|label
operator unknown or in lower case"param": "eq"400 invalid-value|parameter.query.filter[0].param

All error cases together are under When a filter does not fit.

Sources in the code and the knowledge base
  • CDMS/cdms-persistence-database – DatabaseConditionBuilder.buildWhereFilter, memberOf
  • CDMS/cdms-commons – SearchLogicOperations, ListSearchFilter
Search