Query builder

Conditions, groups & operators

The builder canvas is a visual tree of rules and groups. In the UI we call each rule a condition; in code it is a rule — same thing.

Condition cards

Each card has three parts:

PartDescription
FieldColumn to filter (Age, Country, Status, …)
OperatorEquals, Greater Than, Contains, Is Null, …
ValueWhat to compare against (hidden for Is Null / Is Not Null)

Status dots

  • Green — condition is complete and valid
  • Yellow — in progress
  • Red — validation error on this card

Groups & logic

Click the AND / OR chip on a group to toggle how its children combine. Use + Add group for nested logic — groups can contain other groups without a depth limit in the UI.

Drag the handle (⋮⋮) on a card to reorder conditions within a group.

Schema-driven operators

Available operators depend on field type. Numbers get comparisons and Between; strings get Contains and Starts With; enums get a dropdown of allowed values.

All field types support Is Null and Is Not Null.

Sidebar tabs

TabPurpose
DetailsValidation status, stats, data source, field list, presets
QueryLive SQL / MongoDB / GraphQL preview
ResultsExecute against mock data, sort and paginate

Data sources

Lantern ships with two mock schemas: Users (people with age, country, status, purchases, …) and Orders (order ID, amount, status, date). Switching data source resets the query tree.

See validation for when Execute is blocked, and import & export for saving queries as JSON.