Functions
QQL provides built-in functions for boolean logic, string manipulation, math operations, and conditional expressions. Functions can be used inside eval and where commands.
Boolean Functions
Section titled “Boolean Functions”Boolean functions return true or false. They are commonly used in where filter expressions and in eval to create boolean fields.
contains() Check if a string contains a substring contains(message, "error") startsWith() Check if a string starts with a prefix startsWith(path, "/api") endsWith() Check if a string ends with a suffix endsWith(file, ".log") match() Check if a string matches a regex pattern match(message, "^Error:") isNull() Check if a value is null or missing isNull(optional_field) isNotNull() Check if a value is not null isNotNull(user) String Functions
Section titled “String Functions”String functions transform text values. Use them in eval to create or modify string fields.
lower() Convert a string to lowercase lower(user) upper() Convert a string to uppercase upper(level) length() Return the character count of a string length(message) trim() Remove leading and trailing whitespace trim(raw_field) Number Functions
Section titled “Number Functions”Number functions perform math operations on numeric values. Use them in eval to transform numeric fields.
abs() Return the absolute value of a number abs(delta) round() Round a number to the nearest integer round(duration_ms) ceil() Round a number up to the nearest integer ceil(ratio) floor() Round a number down to the nearest integer floor(ratio) Conditional Functions
Section titled “Conditional Functions”Conditional functions return different values based on conditions. Use them in eval to create derived fields with branching logic.