Commit Graph

13673 Commits

Author SHA1 Message Date
Tienson Qin
ab3c249e43 Export db after opening a file graph 2023-12-20 21:57:55 +08:00
Tienson Qin
0356017dec fix: opfs file path 2023-12-20 21:47:56 +08:00
Tienson Qin
4cdc718cea fix: file version path 2023-12-20 21:06:59 +08:00
Tienson Qin
2f03bc988a fix: db/close! still needed 2023-12-20 19:48:36 +08:00
Tienson Qin
cd36c1a0ce Merge branch 'feat/db' into refactor/worker-search 2023-12-20 19:46:10 +08:00
Tienson Qin
aeb5026a26 Add fn to clean up all dbs 2023-12-20 18:43:50 +08:00
Tienson Qin
2d0d298608 fix: load db from disk if it can't be found on OPFS 2023-12-20 18:28:31 +08:00
Tienson Qin
d07790af87 Revert "fix: only look to opfs for db graphs"
This reverts commit 34a71eedaf.
2023-12-20 17:17:58 +08:00
Tienson Qin
cdd1815615 No need to export db when switching graphs 2023-12-20 17:13:47 +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
ceec5624ce Merge pull request #10726 from logseq/enhance/write-to-disk
Save transactions to disk db to avoid data-loss
2023-12-19 17:27:55 -05:00
Gabriel Horner
34a71eedaf fix: only look to opfs for db graphs
For graphs with spaces, looking up electron db graphs was causing
duplicates to appear e.g. "name_space" and "name space". More
importantly, these electron db graphs don't actually exist in opfs
so they won't persist correctly. Part of LOG-2967
2023-12-19 16:48:38 -05: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
b1276f919f fix: open page in cmdk 2023-12-20 02:05:59 +08:00
Tienson Qin
c0be3b5b1f fix: file db full page content search 2023-12-20 01:48:17 +08:00
Tienson Qin
2811dc7d51 Merge branch 'enhance/write-to-disk' into refactor/worker-search 2023-12-20 01:34:48 +08:00
Tienson Qin
16aa7d3f12 fix: can't create graphs name with spaces
Fixes LOG-2967
2023-12-20 00:48:20 +08:00
Tienson Qin
666b4ab6d4 Move ipc calls outside db browser implementation 2023-12-19 23:15:44 +08:00
Tienson Qin
d3b6d0f4ec Remove debugging 2023-12-19 22:57:21 +08:00
Tienson Qin
dfaec37fef Merge branch 'feat/db' into enhance/write-to-disk 2023-12-19 22:52:51 +08:00
Tienson Qin
0ae74ee8c0 fix: can't redo 2023-12-19 21:46:27 +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
b27709ce13 enhance: group db transactions 2023-12-18 23:21:55 +08:00
Tienson Qin
222b2f84bc fix: remove unused addr+data from sqlite 2023-12-18 20:56:28 +08:00
Gabriel Horner
8612f8245d fix: display more notice when re-routing after graph deletion
If left sidebar is collapsed, there's no indication of what graph you
are on so we should at least notify user so it's explained and
not seemingly buggy
2023-12-15 13:41:31 -05:00
Gabriel Horner
8eec034c61 fix: user can't export a file graph as a db graph 2023-12-15 09:55:28 -05:00
Gabriel Horner
6f8badf18f add frontend.persist.db* to list of db namespaces
also cleaned up inconsistent alias and fixed export-db calling
db-based-graph? when caller fns already do this
2023-12-15 09:50:22 -05:00
Gabriel Horner
eecb443fb8 enhance: display notice when deleting graph
also fix file graph deletion kicking off db graph specific deletion
2023-12-15 09:26:44 -05:00
Tienson Qin
e8c41899ac Tweak words a bit 2023-12-15 13:48:36 +08:00
Tienson Qin
24fb0d2cfe enhance: able to switch into another graph when multi-tabs access 2023-12-15 13:46:55 +08:00
Tienson Qin
755cf64a4c fix: acquireAccessHandles if released 2023-12-15 12:03:09 +08:00
Tienson Qin
dbc6af22cc fix: javascript can't close tab 2023-12-15 11:38:10 +08:00
Tienson Qin
ea70f39102 enhance: show modal instead of notification if multi-tabs access 2023-12-15 11:35:25 +08:00
Tienson Qin
52f04c2d24 enhance: redirect to bug report if multi-tabs access to a graph 2023-12-15 11:17:30 +08:00
Tienson Qin
739822f155 fix: release access handles after graph has been downloaded 2023-12-15 11:02:31 +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
Tienson Qin
d38bba76bf Use OPFS storage for file based graphs too 2023-12-14 01:20:31 +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
Tienson Qin
0f01d27f95 Add back page content search for file-based graphs 2023-12-14 00:27:23 +08:00
Tienson Qin
c13565b90a fix: current page search 2023-12-13 23:00:08 +08:00
Gabriel Horner
79a9c59dd5 fix: lint and minor cleanup from datascript-storage PR
- remove unused electron state
- remove comment with nonexistent fns
- rename fn which didn't read well
2023-12-13 09:53:16 -05:00
Tienson Qin
23e31b53fa fix: use block uuid instead of id when building search indice 2023-12-13 22:38:44 +08:00
Tienson Qin
a7de12d59f chore: remove better-sqlite3 2023-12-13 21:35:25 +08:00
Tienson Qin
ba00e5aa68 Merge branch 'feat/db' into refactor/worker-search 2023-12-13 20:55:09 +08:00