Commit Graph

24 Commits

Author SHA1 Message Date
Gabriel Horner
37af8f690e fix: remove remaining uses of file graph specific attributes
Removed all file graph uses of :block/namespace, :block/file, :block/type and
:block/properties except for graph-parser which still uses them for db
importer.
Removed all uses of :block/format except for graph-parser and
src/main/frontend
2026-01-22 13:19:58 -05:00
Gabriel Horner
3fe790d4d7 enhance(dev): scripts can read or write db graphs as full path files
This allows for easier use of debugging graphs as they are exported by
users as a file. Also DRYed up duplicated helper
2025-05-23 13:59:02 -04:00
Gabriel Horner
691b8866ef refactor: mv another common ns out of db dir
Allows for more improved separate linting
2025-04-28 11:27:49 -04:00
Gabriel Horner
fecb42f49d fix(dev): deps scripts not handling relative and absolute paths for graphs
transact and create didn't handle relative paths. All scripts except
import didn't handle absolute paths
2025-03-17 11:09:44 -04:00
Gabriel Horner
0cc9205e99 enhance(dev): option to query multiple graphs 2025-03-13 16:00:01 -04:00
Tienson Qin
5d2ab65d7c Merge branch 'feat/db' into feat/blocks-action-bar 2025-03-08 13:55:33 +08:00
Gabriel Horner
7917afaa45 chore: update nbb scripts to be repl friendly
With https://github.com/babashka/nbb/issues/95 done, this allows
all nbb script namespaces to required or used from a repl
2025-03-07 11:49:28 -05:00
Gabriel Horner
c6a2ea6959 fix(dev): script fails on -h
Also minor db scripts cleanup
2025-03-06 16:21:21 -05:00
Tienson Qin
d847023dc1 Refactor: rename :block/content to :block/title 2024-07-10 22:33:44 +08:00
Gabriel Horner
9a8c91c0cc chore: mv logseq.db.sqlite.db into sqlite.cli
for more explicit name and purpose. Also updated outdated db readme
and removed unused fns in logseq.db.sqlite.db
2024-06-14 16:53:19 -04:00
Gabriel Horner
32ca012635 enhance: pretty print + colorize query script by default 2024-05-23 14:58:55 -04:00
Gabriel Horner
2f0fc3c18c fix: large graph creation having blank and incorrect block counts
large graph chunking assumed a certain tx order which isn't guaranteed.
There are also some edge cases where blocks could get separated from
each other which are now fixed. Also fixed a bug with validating user
properties and made small enhancement for query script
2024-04-23 09:25:07 -04:00
Gabriel Horner
0853940a34 fix: closed :default values validate correctly
and values can be selected from UI. Also tweak query to expand
properties if available
2024-04-16 11:59:04 -04:00
Gabriel Horner
8ec360759a enhance(dev): humanize option for validation script
also fix nil entity query results
2024-04-15 09:36:09 -04:00
Gabriel Horner
cbcff4bae8 fix: schema graph creation for previous properties schema
Also add db/id to query script and fix outdated case insensitive
constraint on property db idents
2024-04-11 17:46:49 -04:00
Gabriel Horner
a8a2afbf4a chore: allow query script to fetch by entity 2024-04-03 09:00:38 -04:00
Gabriel Horner
a61ee21e25 enhance: add basic script to test db graph import
also tweaked query script to work with db graphs by relative path
2024-02-24 00:42:46 -05:00
Gabriel Horner
ffa6aaae29 fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be
  used in other electron ns
- remove sqlite-db/connections atom as its not needed
- remove read-graph as its not necessary
- rename cli.persist-graph as its primary purpose has changed
- update effected scripts
2023-12-13 12:06:24 -05:00
Gabriel Horner
1117ad3cb4 fix lint
also comment out print that prevented chaining query results with bb
2023-11-29 10:14:53 -05:00
Gabriel Horner
edaf9b286a chore: move frontend db namespaces to a dedicated parent ns
Moved these namespaces to logseq.db.frontend.* to make their purpose
explicit and make the namespaces easier to maintain
2023-10-16 17:24:51 -04:00
Gabriel Horner
172ee0ae24 Provide sqlite.cli for reusable sqlite fns
Already had to do read-graph 3 times and will soon need to it outside
logseq so worth putting this behind an api ns
2023-08-15 18:08:44 -04:00
Gabriel Horner
3f52860cf1 Fix perf issue with property rules for db graphs
Use multiple clauses instead as confirmed by perf test.
Using multiple clauses made rule preparation for d/q more complex
so introduced extract-rules
2023-07-25 17:20:17 -04:00
Gabriel Horner
e9fecfa280 Fix property rules for advanced queries with db graphs
and provide a rules var just for db graphs.
Also simplify query-dsl db-graph support as query-dsl/parse-query
doesn't need to know about db graphs for how it's used
2023-07-25 13:53:18 -04:00
Gabriel Horner
671453aadb Add nbb script to demonstrate datascript querying a sqlite db
Also give test vars more appropriate name
2023-07-08 16:20:42 -04:00