Commit Graph

202 Commits

Author SHA1 Message Date
Gabriel Horner
4fd0b65639 bump nbb-logseq to use datascript with dirty flag fix 2024-01-02 17:07:11 -05:00
Gabriel Horner
ff5430cfd7 fix: db lint and tests from #10683 2024-01-02 15:42:36 -05:00
Gabriel Horner
56a81f9671 fix: allow UI and validation to know what property types have :position
this is done by configuring user-built-in-allowed-schema-attributes
and then using the helper fn to check it
Fix LOG-2955
2024-01-02 15:12:36 -05: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
Gabriel Horner
a207296a42 chore: reuse some sqlite db fns
Also removed datascript db atom fetching, unused fns and dep in sqlite.db
2023-12-12 15:09:44 -05:00
Gabriel Horner
0f4cdbbadf bump outdated nbb-logseq and fix lint 2023-12-11 15:55:38 -05:00
Gabriel Horner
fb3e8e8d8a fix: update ds sqlite persistance to match latest frontend
also removed unused util fns
2023-12-11 13:52:26 -05:00
Gabriel Horner
e0901b9d04 bump nbb-logseq to first version
that works for forked datascript. Deps tests pass locally
without needing to rely on local builds
2023-12-11 13:52:15 -05:00
Gabriel Horner
b5eabc80ee fix: db and graph-parser nbb tests to pass locally
Updated sqlite fns to use updated approach. Deleted some unused
fns from old approach
2023-12-11 13:51:47 -05:00
Tienson Qin
75c010e1c3 WIP: use OPFS db for electron 2023-12-06 15:03:29 +08:00
Tienson Qin
ea3f5973b7 Merge branch 'feat/db' into feat/datascript-storage 2023-12-06 01:10:23 +08:00
Tienson Qin
3df099a15e fix: don't retract attributes for db if block content is not updated 2023-12-05 18:07:48 +08:00
Gabriel Horner
e847c0899a enhance: bring back built-in properties using closed values
Fixes LOG-2903. Also fixed a bug with logseq.color property
not working with latest accent color
2023-12-04 17:29:41 -05:00
Gabriel Horner
2554016d63 enhance: make closed values scriptable
Added closed value examples of all 5 property types
to properties graph. Part of LOG-2903
2023-12-04 10:11:52 -05:00
Gabriel Horner
0ffce18d15 chore: rename property.type vars
- renamed schema-type to property-type as its not
  a type of schema and schema is an ambiguous context
  as it also applies to a class
- renamed builtin to built-in to be more correct
2023-11-30 16:26:44 -05:00
Gabriel Horner
f5e339293f fix: add validation for property types and :schema attributes
Part of LOG-2953. We shouldn't persist unusuable property type
configurations as shown by this bug. By enumerating what schema
attributes are allowed for each type, we can prevent future bugs
like this. When changing between property types, this also cleans up
:classes, :position and :values that were accidentally hanging around
for certain types. Also modify test since we don't allow users
to use a :default property with :cardinality
2023-11-30 16:24:11 -05:00
Gabriel Horner
d218db4e6f fix: fixes bug with unusuable :default property
Part of LOG-2953. Also fixes bug when a new property first displays
configure modal and incorrectly shows cardinality for :default property
2023-11-29 17:15:35 -05:00
Andelf
f1d763aa12 chore: comment out electron? feature gate 2023-11-30 02:29:08 +08: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
Tienson Qin
e60ea3ac10 fix: remove debug assert 2023-11-29 21:03:52 +08:00