CONTAINS_SEQUENCE
All functions > ARRAY > CONTAINS_SEQUENCE
Returns true if the array contains the specified sequence as a contiguous subsequence.
Syntax
CONTAINS_SEQUENCE(array: ARRAY<T>, sequence: ARRAY<T>) → BOOLEAN
sql
Type Parameters:
T
: Any type
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
array | ARRAY<T> | Yes | The array to search within |
sequence | ARRAY<T> | Yes | The contiguous sequence to find |
Returns
BOOLEAN - TRUE if sequence appears contiguously in array, FALSE otherwise
Notes
- Checks for contiguous subsequence match
- Elements must appear in order without gaps
- Returns FALSE if sequence is not found
- Returns TRUE for empty sequence
- Uses element equality comparison