Complete redo of content indexing and querying (#517)
Complete redo of data store Introduces live queries and live templates
This commit is contained in:
+16
-20
@@ -1,4 +1,4 @@
|
||||
Attributes can contribute additional [[Metadata]] to various entities:
|
||||
Attribute syntax can contribute additional [[Metadata]] to various [[Objects]] including:
|
||||
|
||||
* Pages
|
||||
* Items
|
||||
@@ -13,7 +13,7 @@ The syntax is as follows:
|
||||
|
||||
For Obsidian/LogSeq compatibility, you can also double the colon like this: `[attributeName:: value]`
|
||||
|
||||
Attribute names need to be alphanumeric. Values are interpreted as [[YAML]] values. So here are some examples of valid attribute definitions:
|
||||
Attribute names need to be alpha numeric. Values are interpreted as [[YAML]] values. So here are some examples of valid attribute definitions:
|
||||
|
||||
* string: [attribute1: sup]
|
||||
* number: [attribute2: 10]
|
||||
@@ -26,36 +26,32 @@ Multiple attributes can be attached to a single entity, e.g. like so:
|
||||
## Scope
|
||||
Depending on where these attributes appear, they attach to different things. For instance, this attaches an attribute to a page:
|
||||
|
||||
[pageAttribute:: hello]
|
||||
[pageAttribute: hello]
|
||||
|
||||
However, usually [[Frontmatter]] is be used for this purpose instead.
|
||||
|
||||
Example query:
|
||||
|
||||
<!-- #query page where name = "Attributes" select name, pageAttribute -->
|
||||
|name |pageAttribute|
|
||||
|----------|-----|
|
||||
|Attributes|hello|
|
||||
<!-- /query -->
|
||||
```query
|
||||
page where name = "{{@page.name}}" select name, pageAttribute
|
||||
```
|
||||
|
||||
This attaches an attribute to an item:
|
||||
|
||||
* Item [itemAttribute:: hello]
|
||||
* Item [itemAttribute: hello] #specialitem
|
||||
|
||||
Example query:
|
||||
|
||||
<!-- #query item where page = "Attributes" and itemAttribute = "hello" select name, itemAttribute -->
|
||||
|name|itemAttribute|
|
||||
|----|-----|
|
||||
|Item|hello|
|
||||
<!-- /query -->
|
||||
```query
|
||||
specialitem where itemAttribute = "hello" select name, itemAttribute
|
||||
```
|
||||
|
||||
This attaches an attribute to a task:
|
||||
|
||||
* [ ] Task [taskAttribute:: hello]
|
||||
* [ ] Task [taskAttribute: hello]
|
||||
|
||||
Example query:
|
||||
|
||||
<!-- #query task where page = "Attributes" and taskAttribute = "hello" select name, taskAttribute -->
|
||||
|name|taskAttribute|
|
||||
|----|-----|
|
||||
|Task|hello|
|
||||
<!-- /query -->
|
||||
```query
|
||||
task where page = "Attributes" and taskAttribute = "hello" select name, taskAttribute
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user