Skip to main content

MMQL Operators

This section provides detailed information about all the MMQL operators, organized by category.

Operator Categories

MMQL operators are organized into the following categories:

Logical Operators

  • $and - Logical AND operation
  • $or - Logical OR operation
  • $not - Logical NOT operation
  • $nor - Logical NOR operation
  • $nand - Logical NAND operation

Comparison Operators

  • $eq - Equal to
  • $ne - Not equal to
  • $gt - Greater than
  • $gte - Greater than or equal to
  • $lt - Less than
  • $lte - Less than or equal to
  • $cmp - Compare values (returns -1, 0, or 1)

Arithmetic Operators

  • $add - Addition
  • $subtract - Subtraction
  • $multiply - Multiplication
  • $divide - Division
  • $mod - Modulo
  • $min - Minimum value
  • $max - Maximum value
  • $abs - Absolute value
  • $ceil - Ceiling
  • $exp - Exponential
  • $floor - Floor
  • $log - Logarithm
  • $pow - Power
  • $round - Round
  • $sqrt - Square root
  • $trunc - Truncate

Aggregation Operators

  • $sum - Sum of all values
  • $avg - Average of all values
  • $median - Median of all values

Bitwise Operators

  • $bitAnd - Bitwise AND
  • $bitOr - Bitwise OR
  • $bitXor - Bitwise XOR
  • $bitNot - Bitwise NOT
  • $bitLeftShift - Bitwise left shift
  • $bitRightShift - Bitwise right shift

String Operators

  • $contains - Contains substring
  • $startsWith - Starts with substring
  • $endsWith - Ends with substring
  • $regex - Match regular expression
  • $toUpper - Convert to uppercase
  • $toLower - Convert to lowercase
  • $concat - Concatenate strings
  • $trim - Trim characters
  • $split - Split string
  • $replace - Replace substring
  • $replaceAll - Replace all substrings
  • $length - String length
  • $parseToString - Parse to string
  • $toString - Convert to string with formatting
  • $camelCase - Convert to camelCase
  • $snakeCase - Convert to snake_case
  • $kebabCase - Convert to kebab-case
  • $titleCase - Convert to Title Case
  • $wordCount - Count words
  • $lineCount - Count lines

Time/Date Operators

  • $toDate - Parse string to date
  • $toTimestamp - Convert to timestamp
  • $year - Extract year
  • $month - Extract month
  • $day - Extract day
  • $hour - Extract hour
  • $minute - Extract minute
  • $second - Extract second
  • $dayOfWeek - Extract day of week
  • $dayOfYear - Extract day of year
  • $weekOfYear - Extract week of year
  • $quarter - Extract quarter
  • $addDays - Add days to date
  • $addMonths - Add months to date
  • $addYears - Add years to date
  • $addHours - Add hours to date
  • $addMinutes - Add minutes to date
  • $addSeconds - Add seconds to date
  • $dateDiff - Calculate date difference

Array Operators

  • $first - Get first element
  • $last - Get last element
  • $nth - Get nth element
  • $filter - Filter array elements
  • $map - Transform array elements
  • $reduce - Reduce array to single value
  • $find - Find first matching element
  • $every - Check if all elements match condition
  • $some - Check if any elements match condition

Object Operators

  • $keys - Get object keys
  • $values - Get object values
  • $hasKey - Check if object has key

Value Checking Operators

  • $isNull - Check if value is null
  • $isEmpty - Check if value is empty

Type Conversion Operators

  • $toBoolean - Convert to boolean
  • $toNumber - Convert to number
  • $toString - Convert to string

Conditional Operators

  • $ifelse - Conditional expression

Random Operator

  • $random - Generate random number

Math Operators

  • $clamp - Clamp value within bounds

UUID and Hash Operators

  • $uuid - Generate UUID
  • $hash - Compute hash

Constant Operators

  • $true - Returns true value
  • $false - Returns false value
  • $null - Returns null value
  • $void - Returns void value

Block Operators

  • $block - Execute block of expressions
  • $let - Declare variable
  • $var - Get variable value
  • $return - Return value from block

Input Operator

  • $input - Access field in input data