Skip to main content
Complete syntax reference for OneTest Query Language (OQL).

Query Structure

All parts except the filter expression are optional.

Operators

Comparison Operators

String Pattern Operators

List Operators

Array Operators

Logical Operators

Data Types

Strings

Enclose in double or single quotes:
Use quotes for strings with spaces or special characters.

Numbers

No quotes needed:

Booleans

Dates

Null Values

Field Names

Field names are case-sensitive:
For fields with spaces or special characters, use quotes:

Ordering

Default order is ASC (ascending).

Pagination

OFFSET requires LIMIT to be specified.

Examples by Complexity

Operator Precedence

From highest to lowest:
  1. ( ) - Parentheses
  2. NOT - Logical NOT
  3. =, !=, >, >=, <, <=, ~, ^, $, IN, CONTAINS - Comparison operators
  4. AND - Logical AND
  5. OR - Logical OR
Use parentheses to make precedence explicit: (A OR B) AND C

Common Patterns

Validation Rules

  • Field names must exist in the schema
  • Operators must match field types (can’t use ~ on numbers)
  • Date formats must be valid ISO 8601
  • Array operators only work on array fields
  • Priority values must be valid (p0-p4)

Error Messages

Common errors and how to fix them:

What’s Next?

Query Examples

Real-world OQL examples

Field Reference

All searchable fields