ARRAY_NOT()
All functions > ARRAY > ARRAY_NOT()
Returns an array with inverted boolean values (logical NOT applied to each element).
Signatures
Returns: Array with each element inverted
ARRAY_NOT(array: ARRAY<BOOLEAN>) → ARRAY<BOOLEAN> sql
| Parameter | Type | Required | Description |
|---|---|---|---|
array | ARRAY<BOOLEAN> | Yes | Array of boolean values to invert |
Notes
- Applies logical NOT to each element
- true becomes false, false becomes true
- Preserves array structure and order
- NULL values remain NULL
See also
Examples
FeatureQL
SELECT
-- Invert boolean values
f1 := ARRAY_NOT(ARRAY(TRUE, FALSE, TRUE)),
-- All false becomes all true
f2 := ARRAY_NOT(ARRAY(FALSE, FALSE, FALSE)),
-- All true becomes all false
f3 := ARRAY_NOT(ARRAY(TRUE, TRUE, TRUE)),
-- Empty array
f4 := ARRAY_NOT(ARRAY()::BOOLEAN[])
;Result
| f1 ARRAY | f2 ARRAY | f3 ARRAY | f4 ARRAY |
|---|---|---|---|
| [false, true, false] | [true, true, true] | [false, false, false] | [] |
On this page