mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
fix(docs): correct formatting and spacing
This commit is contained in:
@@ -113,7 +113,7 @@ logseq.DB.onBlockChanged(uuid, (block, txData) => {
|
||||
#### 3.1 Block Attributes
|
||||
|
||||
| Attribute | File Graph | DB Graph | Type | Description |
|
||||
|-----------|: ----------:|:--------:|------|-------------|
|
||||
|---------------------|:----------:|:--------:|--------|-------------------------------------|
|
||||
| `:block/uuid` | ✅ | ✅ | UUID | Unique block identifier |
|
||||
| `:block/content` | ✅ | ❌ | String | Raw block content (File Graph only) |
|
||||
| `:block/title` | ❌ | ✅ | String | Block title/content (DB Graph only) |
|
||||
@@ -136,7 +136,7 @@ logseq.DB.onBlockChanged(uuid, (block, txData) => {
|
||||
#### 3.2 Page Attributes
|
||||
|
||||
| Attribute | File Graph | DB Graph | Type | Description |
|
||||
|-----------|:----------:|:--------:|------|-------------|
|
||||
|------------------------|:----------:|:--------:|---------|------------------------------------------|
|
||||
| `:block/name` | ✅ | ✅ | String | Page name (lowercase) |
|
||||
| `:block/original-name` | ✅ | ✅ | String | Original page name |
|
||||
| `:block/journal?` | ✅ | ✅ | Boolean | Is journal page |
|
||||
@@ -148,7 +148,7 @@ logseq.DB.onBlockChanged(uuid, (block, txData) => {
|
||||
#### 3.3 DB Graph Specific - System Properties (Idents)
|
||||
|
||||
| Attribute | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
|--------------------------------------|----------|------------------------------|
|
||||
| `:logseq.property/created-at` | Int (ms) | Creation timestamp |
|
||||
| `:logseq.property/updated-at` | Int (ms) | Update timestamp |
|
||||
| `:logseq.property/icon` | Object | Icon definition `{type, id}` |
|
||||
@@ -164,7 +164,7 @@ logseq.DB.onBlockChanged(uuid, (block, txData) => {
|
||||
In DB Graph, tasks use a different system based on tags/classes:
|
||||
|
||||
| Attribute | Description |
|
||||
|-----------|-------------|
|
||||
|--------------------------|-------------------------------------------------------------|
|
||||
| `:block/tags` | Reference to task status class (e.g., `#logseq.class/Todo`) |
|
||||
| `:logseq.task/status` | Task status property |
|
||||
| `:logseq.task/priority` | Task priority property |
|
||||
@@ -178,6 +178,7 @@ In DB Graph, tasks use a different system based on tags/classes:
|
||||
#### 4.1 Task Queries
|
||||
|
||||
**File Graph:**
|
||||
|
||||
```typescript
|
||||
// All TODOs
|
||||
const todos = await logseq.DB.datascriptQuery(`
|
||||
@@ -210,6 +211,7 @@ const scheduled = await logseq.DB. datascriptQuery(`
|
||||
```
|
||||
|
||||
**DB Graph:**
|
||||
|
||||
```typescript
|
||||
// All tasks with TODO status
|
||||
const todos = await logseq.DB.datascriptQuery(`
|
||||
@@ -231,6 +233,7 @@ const tasks = await logseq.DB. datascriptQuery(`
|
||||
#### 4.2 Page Queries
|
||||
|
||||
**Both File Graph and DB Graph:**
|
||||
|
||||
```typescript
|
||||
// All journal pages
|
||||
const journals = await logseq.DB.datascriptQuery(`
|
||||
@@ -259,6 +262,7 @@ const blocks = await logseq.DB. datascriptQuery(`
|
||||
```
|
||||
|
||||
**DB Graph only:**
|
||||
|
||||
```typescript
|
||||
// Pages by type
|
||||
const pages = await logseq.DB.datascriptQuery(`
|
||||
@@ -286,6 +290,7 @@ const recentPages = await logseq. DB.datascriptQuery(`
|
||||
#### 4.3 Reference Queries
|
||||
|
||||
**Both File Graph and DB Graph:**
|
||||
|
||||
```typescript
|
||||
// Blocks referencing a specific page
|
||||
const refs = await logseq.DB.datascriptQuery(`
|
||||
@@ -309,6 +314,7 @@ const blockRefs = await logseq. DB.datascriptQuery(`
|
||||
#### 4.4 Property Queries
|
||||
|
||||
**File Graph:**
|
||||
|
||||
```typescript
|
||||
// Blocks with specific property
|
||||
const withProp = await logseq.DB.datascriptQuery(`
|
||||
@@ -329,6 +335,7 @@ const statusDone = await logseq.DB.datascriptQuery(`
|
||||
```
|
||||
|
||||
**DB Graph:**
|
||||
|
||||
```typescript
|
||||
// Blocks with property value (properties are direct attributes)
|
||||
const withProp = await logseq.DB.datascriptQuery(`
|
||||
@@ -350,6 +357,7 @@ const results = await logseq.DB. datascriptQuery(`
|
||||
#### 4.5 Content Search
|
||||
|
||||
**File Graph:**
|
||||
|
||||
```typescript
|
||||
// Content contains keyword
|
||||
const results = await logseq.DB.datascriptQuery(`
|
||||
@@ -361,6 +369,7 @@ const results = await logseq.DB. datascriptQuery(`
|
||||
```
|
||||
|
||||
**DB Graph:**
|
||||
|
||||
```typescript
|
||||
// Title contains keyword
|
||||
const results = await logseq.DB.datascriptQuery(`
|
||||
|
||||
Reference in New Issue
Block a user