Tienson Qin
b2161ac5ec
feat: collapse/expand block values
2023-09-13 18:45:15 +08:00
Gabriel Horner
c07da6cc80
Move handler.common.repo fn into sqlite-util
...
This makes create-graph* namespaces independent of frontend
as they should be to be used externally
2023-09-06 08:59:40 -04:00
Gabriel Horner
b264d17309
Move db-graph property fns to its own logseq.db ns
...
db-graph related fns like these shouldn't be in the graph-parser dep as
that dep should only really be used with file graphs as much as possible.
This is also being done in preparation for making the create-graph ns independent of
the frontend
Also db- prefixes in fns were dropped since the ns now carries the db-
prefix
2023-09-05 17:15:45 -04:00
Tienson Qin
33f8a24397
perf enhancement
...
1. add :block/tx-id to check whether block has been updated
2. avoid rendering blocks if they're not updated
2023-09-04 14:15:46 +08:00
Gabriel Horner
9fff912f1e
Improve on create graph script
...
- Split out reusable fns to their own ns
- Created graph now initializes all the same data as in the app
- Had to make a copy of block-with-timestamps for nbb compatibility
and started using it in a couple places that are easy to QA
2023-08-20 02:38:53 -04:00
Gabriel Horner
e41adc6399
Disable more property editing for publishing app
...
Also fix some minor lints
2023-08-17 09:42:08 -04:00
Tienson Qin
6087d3dfbd
fix: browser db loading
2023-08-16 13:37:35 +08: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
Tienson Qin
4bff0b975f
Add :block/link to ref-type-attributes
2023-08-15 19:22:49 +08:00
Tienson Qin
d75e5c6e72
chore: rename :block/instance to :block/link
2023-08-15 15:15:49 +08:00
rcmerci
aff2620505
persist edit-operation
2023-08-02 22:54:05 +08:00
Gabriel Horner
0b09b6af56
Fix db lint
2023-07-28 10:46:40 -04:00
Gabriel Horner
84b80e8b76
Fix electron code breaking db deps again
...
Introduced by last commit /cc @rcmerci. This has happened previously at
0c533a9032
and
8a1c54173b
. Please run `yarn test` in
deps/db to catch this
2023-07-28 10:27:24 -04:00
rcmerci
be7cb85e35
update some rtc related ns
2023-07-28 18:52:51 +08:00
Gabriel Horner
0ad7796b19
Fix db lints
2023-07-27 16:45:11 -04:00
Gabriel Horner
cd4059c890
Add support for page property queries
...
page-property-queries test passes
2023-07-27 11:57:10 -04:00
Gabriel Horner
2bd7a8d496
Fix querying for multi non-ref vals and single page-ref
...
Also fixed db lint
2023-07-25 17:27:43 -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
0ca7d1a4de
Fix multi-valued properties and enable first property graph test
...
Run db prop test with: DB_GRAPH=1 node static/tests.js -i focus
2023-07-24 16:42:36 -04:00
Gabriel Horner
4920b3a98e
Fix lints and fix graph-parser cljs tests
...
not running due to missing db dep
2023-07-24 14:06:57 -04:00
Gabriel Horner
b46959f670
Fix: basic property queries not working
...
{{query (property :foo "bar")}} and {{query (property :foo)}} should now
work
2023-07-21 17:27:03 -04:00
Gabriel Horner
48009adaf9
chore: reuse common helper for stringifying datoms
2023-07-20 18:37:22 -04:00
Tienson Qin
b32d2caa2d
fix: built in pages don't have client side timestamps
2023-07-19 17:34:04 +08:00
Tienson Qin
eb35d45d73
Remove :block/properties-text-values for db based graphs
2023-07-19 12:25:11 +08:00
Gabriel Horner
dc2707e398
Remove unused :page_uuid datoms
2023-07-18 13:38:30 -04:00
Gabriel Horner
9310e9e449
Fix db lints
...
Split out a common fn from restore-initial-data to make it
more readable
2023-07-17 12:56:01 -04:00
Tienson Qin
23d3091fce
Added :block/instance to db schema
2023-07-10 16:44:51 +08:00
Tienson Qin
3820cb7ff6
feat: structured pages
2023-07-10 03:01:40 +08:00
Tienson Qin
a0d6107d99
feat: class && configuration
2023-07-09 21:35:06 +08: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
Gabriel Horner
47e1b06f76
Move over restore-other-data and add a test for it
2023-07-08 02:11:35 -04:00
Gabriel Horner
586749c918
Move over restore-initial-data and add the first sqlite to datascript test
2023-07-07 16:43:31 -04:00
Gabriel Horner
62c550e26d
Updated timestamp column types to match actual usage
2023-07-06 14:11:58 -04:00
Gabriel Horner
fa01aefa24
Add an explicit new-db! for new db graphs to simplify other fns
...
Previously open-db! and upsert-blocks! had graph creation
and connection responsibilities. These shouldn't be needed if
new and existing databases have clear entry points
2023-07-04 13:06:21 -04:00
Gabriel Horner
016f7848ce
Add some basic constraints to blocks
...
Without the uuid and type constraints we wouldn't be able to use the
data. Without unique names, it'd be easy for the app to create long running
bugs with duplicate pages
2023-07-03 16:21:23 -04:00
Gabriel Horner
ceb9a1d726
Load more latest journals to reduce the likelihood of an initially buggy journals view
...
Reduces the likelihood of
https://linear.app/logseq/issue/LOG-2650/journals-view-shows-outdated-and-uneditable-journal-pages
occurring but it can still happen for more than 3 journal pages
2023-07-03 14:53:42 -04:00
Gabriel Horner
d82e388ea3
Fix: file pages should save their name
2023-07-03 10:54:30 -04:00
Gabriel Horner
045c51cded
Use sqlite.db ns in electron.db
...
- Add more tests for sqlite.db
- Update readme and CI for db's tests
2023-06-30 17:36:01 -04:00
Gabriel Horner
2ab6370dda
Add tests for core sqlite db fns
...
These core db fns have been split out to be platform agnostic
so they can be run on CLI or non electron platforms
2023-06-30 11:45:39 -04:00
Gabriel Horner
b56cbf0fd2
Fix: one more exception to rule linter
2023-06-28 09:28:42 -04:00
Tienson Qin
d078e207ae
fix: export pages test
2023-06-28 14:25:25 +08:00
Gabriel Horner
75ff4db4aa
Fix: circular dependencies again b/n deps <-> frontend
...
Breaks setup of deps/ and most tests
2023-06-27 16:39:10 -04:00
Gabriel Horner
c11e94ed59
Fix default-page creation for start-conn
2023-06-27 14:39:31 -04:00
rcmerci
0c4e9bf4d4
split db-version query rules
2023-06-27 19:28:12 +08:00
rcmerci
f6080b3657
update property query rules
2023-06-27 15:21:37 +08:00
Tienson Qin
9071320868
fix: create default pages for db-based graphs
2023-06-26 16:34:21 +08:00
rcmerci
b4c547654b
update schema
2023-06-26 11:41:59 +08:00
Tienson Qin
0c533a9032
fix: use db-based schema when possible
2023-06-26 11:07:08 +08:00
Gabriel Horner
4e99e21642
Fix commandline publishing not working e.g. bb dev:publishing
...
Also fix db dep having a circular dependency. frontend.* namespaces depend on deps/ dependencies
so we can't have frontend namespaces in deps/
2023-06-23 16:52:54 -04:00