Skip to content

NULL in SqueakQL

SqueakQL follows SQL-style NULL behavior. Use IS NULL and IS NOT NULL:

assignee IS NULL
parent IS NOT NULL

Do not use equality with NULL:

assignee = NULL

That expression is rejected with a type diagnostic. NULL is not an ordinary value and it is not accepted inside an IN list. This makes missing data checks explicit and avoids the three-valued-logic surprise of comparing a value to NULL with =.

Other comparisons with a missing value do not match, even when negated. For example, NOT assignee = CURRENT_USER excludes unassigned items. To include them, write assignee <> CURRENT_USER OR assignee IS NULL explicitly.

The same SQL-style three-valued behavior applies to Organization Attributes. Use attribute_<key> IS NULL for an unset value. A negated comparison or negated multi-select membership test does not match an unset Attribute. Boolean FALSE is a set value, so attribute_verified = FALSE does not match attribute_verified IS NULL.