ExSift.Operators (ex_sift v0.2.0)
Implementation of MongoDB-style query operators.
This module provides the low-level implementation for all supported operators.
These functions are typically not called directly but are used by the
ExSift.Compiler to build matcher functions.
Categories
- Comparison:
$eq,$ne,$gt,$gte,$lt,$lte - Logical:
$and,$or,$nor,$not - Array:
$in,$nin,$all,$size,$elemMatch - Element:
$exists,$type - Evaluation:
$mod,$regex
Summary
Functions
Checks if array contains all specified values.
All queries must match (logical AND).
Checks if at least one array element matches the query.
Equality comparison.
Checks if value exists (is not nil).
Greater than comparison.
Greater than or equal comparison.
Checks if value is in the given list.
Less than comparison.
Less than or equal comparison.
Performs modulus operation: value % divisor == remainder.
No queries must match (logical NOR).
Negates the query result.
Not equals comparison.
Checks if value is not in the given list.
At least one query must match (logical OR).
Tests if value matches the regex pattern.
Checks if array has the specified size.
Checks if value is of the specified type.
Functions
Checks if array contains all specified values.
All queries must match (logical AND).
Checks if at least one array element matches the query.
Equality comparison.
Supports deep comparison for maps and lists.
Checks if value exists (is not nil).
Greater than comparison.
Greater than or equal comparison.
Checks if value is in the given list.
If value is a list, checks if there's any intersection.
Less than comparison.
Less than or equal comparison.
Performs modulus operation: value % divisor == remainder.
Param should be [divisor, remainder].
No queries must match (logical NOR).
Negates the query result.
Not equals comparison.
Checks if value is not in the given list.
At least one query must match (logical OR).
Tests if value matches the regex pattern.
Checks if array has the specified size.
Checks if value is of the specified type.
Supported types:
- "string" or String
- "number" or "integer" or "float" or Integer or Float
- "boolean" or "bool" or Boolean
- "map" or Map
- "list" or "array" or List
- "atom" or Atom
- "date" or Date
- "datetime" or DateTime
- "nil" or "null"