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: db-version.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Description
2
2
3
-
This page describes DB (database) graph functionality as of Jan 22nd. See [here](https://test.logseq.com/#/) to try the latest stable version. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).
3
+
This page describes DB (database) graph functionality as of Feb 12th. See [here](https://test.logseq.com/#/) to try the latest stable version. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).
4
4
5
5
NOTE: While there is an [automated backup](#automated-backup) for DB graphs, we recommend only using DB graphs for testing purposes.
6
6
@@ -191,9 +191,10 @@ Tasks are improved from the previous version as they more powerful and customiza
191
191
#### Create a Task
192
192
193
193
A new task can be created in a number of ways:
194
-
*Set the status of a block by typing the status choice e.g. `/todo` or cyling status with `Cmd-Enter`.
194
+
*On a block without a tag, add the `Status` property by typing the status choice e.g. `/todo` or cyling status with `Cmd-Enter`.
195
195
* Type text in a block and end it with `#Task`.
196
196
* When on the `Task` page, create a new row in the Task table.
197
+
* On a block without a tag, add the `Deadline` or `Scheduled` property by typing `/Deadline` or `/Scheduled`.
197
198
198
199
#### Task Shortcuts
199
200
@@ -294,14 +295,21 @@ Like other tags, go to their tag pages to view and manage all of them in one pla
294
295
## Tables
295
296
296
297
A table displays a group of nodes as rows and a node's properties as columns. A table behaves like a spreadsheet as table cells are editable by default. A node has the following special columns which are available by default: `Name`, `Created At` and `Updated At`. Tables have the following features:
297
-
* Sort rows by any column, ascending or descending.
298
-
* Filter rows by multiple columns by clicking on the filter icon. For columns with a specific property type e.g. :number and :date, there are specific filters for that type.
299
-
* Hide columns by clicking on the three dots menu and selecting `Columns visibility`.
300
-
* Drag columns to sort their order.
298
+
* Sort rows by multiples columns, sorting each by ascending or descending. Click on the sort icon to remove a sorting.
299
+
* Filter rows by multiple columns by clicking on the filter icon.
300
+
* Multiple filters can be applied. By default, only rows that match all filters display (AND the filters). To match on any filter (OR filters), change the dropdown on the right to `Match any filter`.
301
+
* For columns with a specific property type e.g. :number and :date, there are specific filters for that type.
302
+
* Group rows by a column by clicking on the three dots menu and selecting `Group by`.
303
+
* Rows can be grouped by all property types except `DateTime`.
304
+
* While each group is displayed as a different table, they all obey the same column configurations.
301
305
* Switch between `Table View`, `List View` or `Gallery View` by selecting one in the table's header. The `List View` displays nodes in an outliner with nodes grouped by pages. The `Gallery View` is useful for viewing blocks as square tiles, especially for assets.
302
-
* Resize columns by dragging the resize handle at a column header's border.
303
306
* Click on the magnifying glass icon to live search a table. This is the only feature that doesn't persist when switching away from a table.
304
307
* Click `+ New` at the bottom of a table to create a new block. If in a property or tags table, the newly created block will be associated with the respective property or tag.
308
+
* Columns can be configured in a number of ways:
309
+
* Hide columns by clicking on the three dots menu and selecting `Columns visibility`.
310
+
* Drag columns to sort their order.
311
+
* Pin column(s) to ensure they appear first.
312
+
* Resize columns by dragging the resize handle at a column header's border.
305
313
306
314
A powerful new feature of tables is the ability to create a table view. This is currently enabled for tag pages. To use it, click the `+` icon in the upper left to create a new tab in the table. Click on the tab's header to rename or delete this new view. Within this view, all of the above persisting features will save!
307
315
@@ -353,6 +361,8 @@ An automated backup of graphs is available by clicking on the upper right three
353
361
354
362
## Export and Import
355
363
364
+
### Graph Export
365
+
356
366
To export a DB graph, click on the three dots menu in the upper right corner, select `Export graph` and then choose one of the following options:
357
367
358
368
1.`Export SQLite DB` - Export graph as a [SQLite](https://sqlite.org/) .db file.
@@ -368,6 +378,18 @@ To import the exported .sqlite file, click on the three dots menu in the upper r
368
378
2.`File to DB graph` - Import a markdown graph. See the [db graph importer](#db-graph-importer) for more on it.
369
379
3.`Debug Transit` - Import a debug transit file from export.
370
380
381
+
### EDN Data Export
382
+
383
+
Exported EDN data allows any DB graph content to be shared between users as text. With this text, a user can then import it to replicate the same visible and behavioral content including the content's properties, tags. This is important as it gives users control of their content and enables some workflows that aren't possible with file graphs. This feature is available with the following commands:
384
+
385
+
*`Export block EDN data` - Run this command on the current block to copy it to the clipboard. When this data is imported, it will overwrite the current block.
386
+
*`Export page EDN data` - Run this command on the current page to copy it to the clipboard. When this is imported to an existing page, it will append to the existing page.
387
+
*`Export graph's tags and properties EDN data` - Run this command to copy the entire graph's tags and properties. This is useful for sharing your workflows with others without sharing your graph-specific data. This is an example of a workflow that was not possible with file graphs.
388
+
*`Import EDN data` - Run this command to import any of the above exported data. If importing a block, you must have focus on the block you want to import into.
389
+
390
+
For developers, this shareable EDN data can also be used in scripts to create or modify existing graphs. For example, a page's data could be passed to [this script](https://github.com/logseq/logseq/blob/feat/db/deps/db/script/create_graph.cljs) to create a new DB graph with that page.
391
+
392
+
371
393
## Scripting
372
394
373
395
DB graphs are scriptable using https://github.com/logseq/nbb-logseq/tree/feat/db. Scripts can both read and _write any_ data in a DB graph. To write your own script, you'll need a package.json and nbb.edn. Use [this example package.json](https://github.com/logseq/publish-spa/blob/feat/db/package.json) and [this example nbb.edn](https://github.com/logseq/publish-spa/blob/feat/db/nbb.edn). Some example scripts:
0 commit comments