-
Notifications
You must be signed in to change notification settings - Fork 1
Query Builder
Marjo edited this page Jan 9, 2026
·
1 revision
The Query Builder allows you to create Firestore queries with an interactive UI.
Press F (Shift+F) on:
- A collection in the Collections panel
- A subcollection in the Tree panel
┌─ Query Builder ─────────────────────────────┐
│ Collection: users │
│ │
│ WHERE: │
│ [field] [==] (auto) [value] │
│ │
│ ORDER BY: [field] [ASC] │
│ LIMIT: [50] │
│ │
│ [ Execute ] [ Clear ] │
└─────────────────────────────────────────────┘
| Key | Action |
|---|---|
j / ↓
|
Move to next row |
k / ↑
|
Move to previous row |
h / ←
|
Move to previous field |
l / →
|
Move to next field |
Enter |
Edit selected field / Execute button |
Esc |
Close query builder |
| Key | Action |
|---|---|
a |
Add new WHERE filter |
d |
Delete current WHERE filter |
Each WHERE filter has four components:
-
Field - The document field to filter on (e.g.,
status,age,createdAt) - Operator - Comparison operator (opens popup selector)
- Type - Value type (auto-detected or manual)
- Value - The value to compare against
| Operator | Description |
|---|---|
== |
Equal to |
!= |
Not equal to |
< |
Less than |
<= |
Less than or equal |
> |
Greater than |
>= |
Greater than or equal |
in |
Value in array |
not-in |
Value not in array |
array-contains |
Array contains value |
array-contains-any |
Array contains any of values |
| Type | Description |
|---|---|
auto |
Auto-detect type from value |
string |
Text value |
integer |
Whole number |
double |
Decimal number |
boolean |
true/false |
null |
Null value |
array |
Array (for in, not-in, array-contains-any) |
Set the field to sort results by and the direction:
-
ASC- Ascending (smallest first) -
DESC- Descending (largest first)
Maximum number of documents to return (default: 50).
Press Enter on the Execute button to run the query.
Results replace the entire tree view.
Results appear under the subcollection node in the tree, preserving the rest of the tree structure.
Press Enter on the Clear button to reset all filters, ORDER BY, and LIMIT to defaults.
WHERE: [status] [==] (string) [active]
WHERE: [age] [>] (integer) [18]
ORDER BY: [age] [ASC]
WHERE: [createdAt] [>] (auto) [2024-01-01]
ORDER BY: [createdAt] [DESC]
LIMIT: [100]
- Use
autotype for most values - it will detect strings, numbers, and booleans - For date fields, enter ISO format dates as strings
- Firestore requires composite indexes for some query combinations
- If a query fails, check the error message for index requirements