Commit Graph

218 Commits

Author SHA1 Message Date
Tienson Qin
5fd91035df wip: transact to worker directly
Previously, the transactions will go though main thread db -> worker
db, this commit changes it to worker db first and then send the
updates to the main thread db.

This change does introduce some bugs because all the db transactions
are async now.
2024-01-08 20:53:23 +08:00
Tienson Qin
dbba75157d Sync db worker changes back to the main ui thread 2024-01-08 19:09:54 +08:00
Tienson Qin
38ba0dfa7c Move entity plus to db dep 2024-01-08 15:35:09 +08:00
Tienson Qin
9597330d9f Remove db/state dep on page handler 2024-01-07 17:24:54 +08:00
Tienson Qin
fa2892cef6 use ldb/transact! instead of d/transact! 2024-01-05 06:42:10 +08:00
Tienson Qin
7c4baf97db fix both page create and delete 2024-01-05 03:09:35 +08:00
Tienson Qin
1e72d0efc7 Move page-delete to worker 2024-01-05 02:47:40 +08:00
Tienson Qin
9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Tienson Qin
670bc3a5c7 enhance: enable entity transaction 2024-01-03 14:42:44 +08:00
Tienson Qin
e579f668eb wip: remove dependency on frontend.db for outliner core 2024-01-02 23:23:49 +08:00
Tienson Qin
0ca1bd61eb wip: outliner core refactor 2024-01-02 21:46:40 +08:00
Tienson Qin
48b5593008 wip: outliner refactor 2024-01-02 18:07:17 +08:00
Tienson Qin
84851a5639 Move db fix to worker 2023-12-28 22:16:21 +08:00
Tienson Qin
4016f93884 Move db validate to worker 2023-12-28 21:25:00 +08:00
Tienson Qin
ee12e58254 refactor ns 2023-12-28 18:46:09 +08:00
Tienson Qin
eb679bd941 wip: file worker 2023-12-28 17:32:43 +08:00
Tienson Qin
dda11a33a7 Move outliner tree to the outliner dep 2023-12-27 02:53:00 +08:00
Tienson Qin
5b13fe6df4 perf: reduce disk writes 2023-12-27 00:06:39 +08:00
Tienson Qin
54d2cd6a0d fix: tests and warnings 2023-12-25 17:36:46 +08:00
Tienson Qin
e6a464e64f enhance: creating built-in properties when creating db conn 2023-12-23 17:53:57 +08:00
Tienson Qin
018e1ae8ee Merge branch 'master' into feat/db 2023-12-23 14:18:25 +08:00
Tienson Qin
5bc80ccf22 Disable property position for date and page types
Close LOG-2955
2023-12-22 22:43:39 +08:00
Tienson Qin
822001aace Merge branch 'feat/db' into refactor/worker-search 2023-12-22 21:33:53 +08:00
Tienson Qin
90ed070104 bump datascript 2023-12-22 18:04:33 +08:00
Gabriel Horner
d4f438f228 bump nbb-logseq for latest datascript 2023-12-21 13:00:44 -05:00
Tienson Qin
77a8ea13ab Merge branch 'feat/db' into refactor/worker-search 2023-12-21 21:35:41 +08:00
Tienson Qin
d39f2b6a36 fix: release bug 2023-12-21 20:44:49 +08:00
Tienson Qin
8f7c496ab4 chore: bump datascript 2023-12-21 19:01:38 +08:00
Gabriel Horner
0fc1fd0f15 fix: error or notify loudly if db transactions aren't being transacted
followup to
https://github.com/logseq/logseq/pull/10726#discussion_r1431990823
2023-12-20 13:44:45 -05:00
Tienson Qin
75c396a92f fix: file graph restore 2023-12-21 02:40:03 +08:00
Tienson Qin
4cdc718cea fix: file version path 2023-12-20 21:06:59 +08:00
Tienson Qin
cd36c1a0ce Merge branch 'feat/db' into refactor/worker-search 2023-12-20 19:46:10 +08:00
Tienson Qin
66499c2df5 fix: sanitize graph name before creating
This commit also stores dbs in `/logseq-pool-graph-name/db.sqlite`
which will affect existing dbs on OPFS.
2023-12-20 17:03:17 +08:00
Gabriel Horner
6a321a846d Merge branch 'feat/db' into enhance/write-to-disk 2023-12-19 14:32:30 -05:00
Gabriel Horner
52f7afa18f bump nbb-logseq to latest datascript with another storage delete fix
part of LOG-2974
2023-12-19 13:42:13 -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
Tienson Qin
2811dc7d51 Merge branch 'enhance/write-to-disk' into refactor/worker-search 2023-12-20 01:34:48 +08:00
Tienson Qin
dfaec37fef Merge branch 'feat/db' into enhance/write-to-disk 2023-12-19 22:52:51 +08:00
Tienson Qin
dd2f1014eb Bump datascript
This version reuses addresses to reduce writes and make GC easier
2023-12-19 21:15:57 +08:00
Gabriel Horner
de3d82baba bump to latest nbb-logseq with datascript.storage delete fix 2023-12-18 11:10:59 -05:00
Tienson Qin
222b2f84bc fix: remove unused addr+data from sqlite 2023-12-18 20:56:28 +08:00
Gabriel Horner
8dde33e915 chore: Update datascript to latest version before our fork
Also updated db/entity because d/entity returns nil for nonexistent ids since 1.4.2
2023-12-15 09:42:52 +08:00
Tienson Qin
a9f62baf6d wip: transact tx to disk to avoid data-loss 2023-12-15 09:39:56 +08:00
Tienson Qin
e8e553c08c Remove bak file 2023-12-14 02:14:48 +08:00
Tienson Qin
b8a6f820ad New file based graphs works with opfs db 2023-12-14 02:12:24 +08: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
Tienson Qin
f3d032d83d fix: move some fns from db.sqlite to sqlite.common-db
To remove better-sqlite3 dependency on Electron.
2023-12-14 00:34:07 +08:00
Gabriel Horner
e228bd1fb6 fix: tweak schema to be valid for new db graphs
Also reuse initialization data
2023-12-12 16:05:06 -05:00
Gabriel Horner
36a553e4a1 chore merge sqlite-restore into sqlite-db
Also use it on the frontend. Also remove another unnecessary sqlite.db fn
2023-12-12 15:41:02 -05:00