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
1ccdcab8a9
enhance(dev): optionally validate after creating a db
...
Doing this enough that an option makes this faster to invoke
and faster (no re-open) on large graphs
2025-03-07 11:45:17 -05:00
Gabriel Horner
c6a2ea6959
fix(dev): script fails on -h
...
Also minor db scripts cleanup
2025-03-06 16:21:21 -05:00
Gabriel Horner
8b8055dd72
refactor: use namespaced keyword for block export
...
instead of confusing :build/block. Also improved related tests,
simplified import steps, added some missing sqlite.build docs,
and fixed :build/uuid not working for some existing journals.
2025-02-10 15:18:45 -05:00
Gabriel Horner
455ccec296
chore: rename sqlite.build edn to remove mention
...
of schema. schema concept no longer exists and these old
names would be confusing
2025-01-21 14:22:16 -05:00
Gabriel Horner
68896c257f
Merge branch 'feat/db' into refactor/block-schema
2025-01-16 17:11:53 -05:00
Gabriel Horner
769e68a3c6
enhance(dev): add :dispatch-key to validate-db! errors
...
so it's available to tests and to app
2025-01-15 18:04:47 -05:00
Tienson Qin
a7e9d073cd
chore: rename :property/* to :logseq.property/*
2025-01-15 14:59:08 +08:00
Tienson Qin
93a7034249
Remove more cases of :block/schema
2025-01-13 10:00:00 +08:00
Gabriel Horner
b113967c9c
enhance(dev): cli validation includes dispatch key
...
use dispatch-key to immediately find invalid schema
2025-01-10 10:06:43 -05:00
Tienson Qin
68f758cdc9
fix: invalid data
...
/Validate current graph will try to fix those errors.
fixes https://github.com/logseq/db-test/issues/205 .
2025-01-09 21:15:12 +08:00
Tienson Qin
8a0a05183e
refactor: remove :block/format for db graphs ( #11667 )
2025-01-05 12:10:47 +08:00
Gabriel Horner
1bba10c266
fix: graph counts after validation are wrong
...
after type->tags migration. Also update recommended validate cli options
to default to true. Also clean up graph counts spread across two
validators and importer. The property-pairs count in the UI were way off
because they were only counting pairs that are validated by malli-schema
2025-01-04 02:14:39 -05:00
rcmerci
b0379811c0
fix: fix validate db test (2)
2024-12-02 13:59:06 +08:00
rcmerci
d2c877b484
fix: fix validate db test
2024-12-02 13:51:27 +08:00
Gabriel Horner
e231192cda
enhance: add import metadata
...
Useful for debugging different types of imports and knowing
when import was done, especially since it can differ from when
graph was created
2024-10-17 13:23:30 -04:00
Gabriel Horner
fbcaeb5e20
fix: example edn uses outdated property type
2024-08-20 17:10:28 -04:00
Tienson Qin
f46372b346
chore: keep using class instead of tag for internal usage
2024-08-06 07:15:41 +08:00
Tienson Qin
411b05e7ba
Prefer to use ldb/{type}? check when possible
2024-08-05 17:51:24 +08:00
Tienson Qin
4083a2d0a0
enhance: prefer tag instead of class on UI
...
Some users are confused with Classes/Objects, so on UI it'll be
Tags/Nodes.
2024-08-05 15:06:54 +08:00
Tienson Qin
d26e620a82
refactor: update :block/type to cardinality one instead of many
2024-07-31 19:35:26 +08:00
Tienson Qin
d847023dc1
Refactor: rename :block/content to :block/title
2024-07-10 22:33:44 +08:00
Tienson Qin
a1f352773b
refactor: rename :block/original-name to :block/title
2024-07-10 21:43:03 +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
95db811f55
fix: frontend tests shouldn't depend on sqlite3
...
frontend.test.helper was accidentally coupled to sqlite3 via
logseq.outliner.db-pipeline. Split out sqlite3 dependent fns to
logseq.outliner.cli so it's clear this shouldn't be coupled to frontend
2024-06-14 14:41:24 -04:00
Gabriel Horner
0f122e9a7e
fix: schema graph generation
...
Regressed with property value change. Also updated debug file and
fixed a missing built-in property ns which caused an invalid debug file
2024-06-14 11:38:14 -04:00
Gabriel Horner
0e1ada2ef6
enhance: bb task for creating graphs from EDN file
...
Converted inferred graph to an EDN file now that this task exists. Also
merge last of tasks.create-graph to relevant ns so that external users
can also create such tasks
2024-06-11 10:09:37 -04:00
Gabriel Horner
32ca012635
enhance: pretty print + colorize query script by default
2024-05-23 14:58:55 -04:00
Gabriel Horner
670b46f221
fix: validate property values again
...
caused by property pair revert 5d4ae66d86
2024-04-30 12:25:12 -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
8cbc0ac32a
fix: validate property values
2024-04-12 15:27:26 -04:00
Gabriel Horner
4f3b7e7687
fix: ref checks in schema
...
attribute in the wrong schema and db graph only vars had file graph
keys. Also temp fix to avoid crashing ui with props
2024-04-12 12:15:59 -04:00
Gabriel Horner
b2a22498ea
fix: closed validation with new properties
...
Also fix group error reporting incorrectly and improve it by adding
:db/id
2024-04-12 11:32:03 -04:00
Gabriel Horner
354c0c1e42
fix: built-in? helper and most deps tests
...
Also fix validate script's count
2024-04-12 10:04:43 -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
608d627544
fix: add back properties validation
...
and fix closed validation. Also temporarily comment out properties graph parts
that are still invalid
2024-04-04 21:09:28 -04:00
Gabriel Horner
a8a2afbf4a
chore: allow query script to fetch by entity
2024-04-03 09:00:38 -04:00
Gabriel Horner
3d49585078
fix: create properties graph and validate graph script
2024-04-02 13:58:52 -04:00
Gabriel Horner
5d915de2e2
enhance: add more useful counts to validation script
...
helpful for checking a new/imported db graph hasn't regressed
2024-02-26 11:52:46 -05: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
f28cf73ef4
enhance: validate db once for an import
...
and notify if there are invalid blocks. Removed validating per tx during
import which speeds up import 5-10% on small graphs and more on larger
graphs. Also print some useful stats in the console
2024-02-19 15:34:58 -05:00
Gabriel Horner
72f5218b39
dev: add tasks for saving and diffing datoms
...
part of LOG-2974
2023-12-19 13:19:10 -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
e5e25bb403
update schema for new hidden page attributes
...
part of LOG-2854. Also update --closed-maps to use library fn
2023-10-26 12:05:12 -04:00
Gabriel Horner
4fd591620b
validate entities that are changed per transact!
...
This should help us catch bugs due to invalid data fairly quickly.
This only runs when in dev?
part of LOG-2818
2023-10-20 16:57:00 -04:00