Repository navigation
Update Advanced Queries.md, may resolve #69 #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,33 @@ description:: Advanced queries are written with [Datalog](https://en.wikipedia.o | |
| - `:Xd-after-ms` - Timestamp of X days after today. **New syntax** `:+Xd-ms` | ||
| - `:start-of-today-ms` - Timestamp for beginning of today. **New syntax** `:today-start` | ||
| - `:end-of-today-ms` - Timestamp for end of today. **New syntax** `:today-end` | ||
| - ### Query parameters and functions | ||
| created-at:: 1697057234 | ||
| updated-at:: 1697057234 | ||
| - You'll see example queries below that compose concepts expressed in this section. | ||
| View [comments in the source](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/query_dsl.cljs/#L22-L48) | ||
| - #### Page data | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could see this being useful. Mentioning the 'Show page data' and 'Show block data' commands under |
||
| - Page data can be viewed by opening the "(Dev) Show page data" from the page's context menu. This is made available by enabling [[Developer mode]]. | ||
| - #### Block data | ||
| - Block data can be viewed by opening the "(Dev) Show block data" from the block's context menu. This is made available by enabling [[Developer mode]]. | ||
| - #### Logical Operators | ||
| - and | ||
| - or | ||
| - not | ||
| - #### Filters | ||
| - `between` | ||
| - `property (block)` | ||
| - `task (block)` | ||
| - `priority (block)` | ||
| - `page` | ||
| - `sample` | ||
| - `full-text-search ""` | ||
| - #### Namespace | ||
| - `page-property (page)` | ||
| - `page-tags (page)` | ||
| - `all-page-tags` | ||
| - #### Sorting | ||
| - `sort-by (data) (asc|desc)` | ||
| - ## Query Examples | ||
| - 1. Get all tasks | ||
| created_at:: 1609232063516 | ||
|
|
@@ -408,4 +435,4 @@ description:: Advanced queries are written with [Datalog](https://en.wikipedia.o | |
| - [Datomic query documentation](https://docs.datomic.com/query.html) - Thorough reference for datomic dialect of Datalog. Explains most datalog concepts well | ||
| - https://nextjournal.com/try/learn-xtdb-datalog-today/learn-xtdb-datalog-today - Interactive datalog tutorial for engineers | ||
| - [Datascript's intro docs](https://github.com/tonsky/datascript/wiki/Getting-started) | ||
| - [Logseq's database schema](https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/schema.cljs) | ||
| - [Logseq's database schema](https://github.com/logseq/logseq/blob/master/deps/db/src/logseq/db/schema.cljs) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this link is broken, maybe it should point to the model file? https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not seeing an issue with the current link |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this section is already written in https://docs.logseq.com/#/page/queries and putting it in this page is unfortunately incorrect. There are already a couple of references to "simple query" in this page. I could link simple query to https://docs.logseq.com/#/page/queries if that helps