You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/queries.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,4 +116,38 @@ Here are several examples demonstrating the use of the query language:
116
116
117
117
11. **List all high-priority, incomplete "Task" blocks in the current folder, sorted by `DueDate`:**
118
118
```
119
-
LIST FROM BLOCKS IN this.folder WHERE Type = "Task" AND Priority = "High" AND Status != "Done" SORT BY DueDate ASC
119
+
LIST FROM BLOCKS IN this.folder WHERE Type = "Task" AND Priority = "High" AND Status != "Done" SORT BY DueDate ASC
120
+
121
+
## Running Queries
122
+
123
+
There are two primary ways to execute queries in Point Blank: manually writing query blocks or using commands from the Command Palette.
124
+
125
+
### Manual Workflow
126
+
127
+
You can write queries directly in your markdown files. The query engine identifies queries by a special HTML comment.
128
+
129
+
1. **Write the Query:** Type your query inside a comment block like this:
130
+
```markdown
131
+
<!-- pointblank:query LIST FROM BLOCKS WHERE Type = "Task" AND Status = "Pending" -->
132
+
```
133
+
2. **Execute the Query:** Place your cursor anywhere in the file and run the **`Point Blank: Update Query`** command from the VS Code Command Palette (`Ctrl+Shift+P`). The extension will find the nearest query block (searching down from the cursor), execute it, and insert the results directly above the comment block.
134
+
135
+
### Using Commands
136
+
137
+
Point Blank provides commands to simplify the process of creating and updating queries.
138
+
139
+
* **`Point Blank: Insert Query by Type`** (`pointblank.insertTypeQuery`)
140
+
* This command will prompt you to enter a `Type` name (e.g., "Task", "Note").
141
+
* It will then insert a complete query block into the editor, ready to be executed.
142
+
* Example Query Inserted: `LIST FROM BLOCKS WHERE Type::Task`
0 commit comments