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:
| Part | Description |
|---|---|
| Field | Column to filter (Age, Country, Status, …) |
| Operator | Equals, Greater Than, Contains, Is Null, … |
| Value | What 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
| Tab | Purpose |
|---|---|
| Details | Validation status, stats, data source, field list, presets |
| Query | Live SQL / MongoDB / GraphQL preview |
| Results | Execute 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.