Skip to content

DartQL Syntax Reference

DartQL uses SQL-92 WHERE clause syntax to filter tasks. If you know SQL, you already know DartQL.

status = 'To Do' AND priority = 4

Every DartQL expression follows the pattern:

field operator value [AND|OR field operator value ...]

String values must be quoted with single quotes. Field names and operators are case-insensitive.

OperatorDescriptionExample
=Equalsstatus = 'To Do'
!=Not equalspriority != 2
<>Not equals (SQL-92 alias for !=)priority <> 2
>Greater thandue_at > '2026-02-01'
>=Greater than or equalpriority >= 4
<Less thandue_at < '2026-01-18'
<=Less than or equalpriority <= 3
OperatorDescriptionExample
INValue is in a liststatus IN ('To Do', 'Doing')
NOT INValue is not in a listpriority NOT IN (1, 2)
BETWEENValue is within a range (inclusive)created_at BETWEEN '2026-01-01' AND '2026-01-31'
OperatorDescriptionExample
LIKEPattern match (case-insensitive)title LIKE '%authentication%'
CONTAINSArray contains valuetags CONTAINS 'urgent'
INCLUDESAlias for CONTAINStags INCLUDES 'bug'
HASAlias for CONTAINStags HAS 'security'
OperatorDescriptionExample
IS NULLField is null, undefined, or emptydue_at IS NULL
IS NOT NULLField has a valueassignee IS NOT NULL

For array fields like blocker_ids, IS NULL matches empty arrays [] as well as undefined.

Combine conditions with logical operators:

OperatorDescriptionExample
ANDBoth conditions must be truestatus = 'To Do' AND priority = 4
OREither condition must be truestatus = 'To Do' OR status = 'Doing'
NOTNegates a conditionNOT (priority = 2)
( )Groups conditions to control evaluation order(status = 'To Do' OR status = 'Doing') AND priority = 4

Precedence (highest to lowest):

  1. ( ) — parenthesized groups
  2. NOT
  3. AND
  4. OR

Without parentheses, AND binds tighter than OR. This query:

status = 'To Do' OR status = 'Doing' AND priority = 4

is evaluated as:

status = 'To Do' OR (status = 'Doing' AND priority = 4)

Use parentheses to make intent explicit:

(status = 'To Do' OR status = 'Doing') AND priority = 4
FieldTypeDescription
statusstringTask status (e.g., 'To Do', 'Doing', 'Done')
priorityintegerPriority level, 1 (lowest) to 5 (highest). Use get_config to see your workspace’s label-to-number mapping.
sizeintegerSize estimate, 1 (XS) to 5 (XL)
titlestringTask title
descriptionstringTask description body
assigneestringAssignee email address
dartboardstringDartboard path (e.g., 'Engineering/backend')
tagsarrayTag strings
dart_idstringUnique task identifier
FieldTypeDescription
created_attimestampWhen the task was created
updated_attimestampWhen the task was last modified
due_attimestampTask due date
start_attimestampTask start date
completed_attimestampWhen the task was completed

Date values use ISO 8601 format: '2026-01-15T00:00:00Z' or '2026-01-15'.

FieldTypeDescription
parent_taskstringParent task ID
subtask_idsarrayIDs of child tasks
blocker_idsarrayIDs of tasks blocking this one
blocking_idsarrayIDs of tasks this one blocks
duplicate_idsarrayIDs of duplicate tasks
related_idsarrayIDs of related tasks

dart-query automatically optimizes queries by pushing compatible filters to the Dart API. Filters that cannot be pushed are applied client-side.

These filters are sent directly to the Dart API and return only matching tasks:

  • = equality on: assignee, status, dartboard, priority, tags
  • Range operators (<, >, <=, >=) on: due_at only — range operators on priority fall back to client-side filtering
  • AND logic only
-- Fast: all conditions are API-compatible
status = 'To Do' AND dartboard = 'Engineering/backend' AND priority = 4

These require fetching tasks first, then filtering in memory:

  • OR logic
  • NOT logic
  • != and <> operators
  • IN, NOT IN, LIKE, CONTAINS, IS NULL, IS NOT NULL, BETWEEN
  • Any operator on fields not listed above
-- Slower: OR triggers client-side filtering
status = 'To Do' OR status = 'Doing'
-- Faster equivalent using IN (still client-side, but cleaner)
status IN ('To Do', 'Doing')

For best performance, combine API-compatible conditions with AND and limit client-side filters to what you actually need.

status = 'To Do'
dartboard = 'Engineering/backend'
priority = 4
status = 'To Do' AND priority = 4
dartboard = 'Engineering/backend' AND assignee = 'john@company.com'
due_at < '2026-01-18T00:00:00Z'
due_at > '2026-02-01T00:00:00Z'
created_at BETWEEN '2026-01-01T00:00:00Z' AND '2026-01-31T23:59:59Z'
(status = 'To Do' OR status = 'Doing') AND priority = 4
dartboard = 'Engineering/backend' AND (priority = 5 OR tags CONTAINS 'urgent')