Commit Graph

121 Commits

Author SHA1 Message Date
Gabriel Horner
6c876a0be2 chore: convert last of frontend tests to db graphs
Now able to remove unused frontend.test.* namespaces.
Also removed file-graph specific handling of old attrs like
:block/ref-pages
2026-01-22 13:19:57 -05:00
Gabriel Horner
96a9f95622 fix: remove file graph code from query-dsl
Allows removing unused file-rules and common.marker. Also remove
any incorrect or unused references to file graph markers like NOW
2026-01-22 13:19:57 -05:00
Gabriel Horner
e07ff6dd88 chore: convert query-dsl tests to db graphs
Able to remove some dead code and add :build.test/title which
is reusable for future tests
2026-01-22 13:19:57 -05:00
Tienson Qin
bcc478b5f7 refactor: separate og and db version (#12276)
separate og and new version apps

remove file sync, tldraw, excalidraw and zotero
2025-12-29 15:39:32 +08:00
Tienson Qin
d809af8cef fix: page ref query uses UUID instead of name
To avoid name collisions.
2025-11-03 22:26:39 +08:00
Tienson Qin
8a4fa601d2 fix: build closed values 2025-10-14 16:51:34 +08:00
Tienson Qin
fa7cd07192 fix: :and ref query should return nodes that having at least one ref (#12085)
This commit also adds a new :self-ref rule.

`[[page]]` will uses :self-ref,
`(or [[page1]] [[page2]])` will be `(or [:self-ref page1] [:self-ref
page2]`.
`(and [[page1]] [[page2]])` will be `(and [:page-ref page1] [:page-ref
page2] (or [:self-ref page1] [:self-ref page2]))` to ensure the query
result nodes to have at least one page reference.
2025-09-04 17:08:03 +08:00
Tienson Qin
248d8c33f2 refactor: remove block/path-refs (#12081)
1. refactor: use :block/refs and has-ref rule instead of path-refs
2. remove block/path-refs
3. removes :block-parent rule since there's already :parent
4. enhance: skip pipeline calculation for rtc initial download tx
5. refactor(rtc): remove memoize

---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2025-09-03 20:33:33 +08:00
Gabriel Horner
268889d0b7 chore: rename sqlite.build :build/class-parent to :build/class-extends
Matches new property name and its arity. :build/class-parent deprecated
2025-06-29 15:21:09 +08:00
Tienson Qin
ded9c8e517 fix: update :build/class-parent to multiple values 2025-06-29 15:21:09 +08:00
Gabriel Horner
5be0d024ae fix: model lint and remove unused fns and frontend.db
bindings
2025-05-09 02:51:54 +08:00
Gabriel Horner
4f65a00c68 refactor: rename :logseq.task properties to :logseq.property
These are the only built-in properties that don't start with
:logseq.property
2025-05-06 12:29:09 +08:00
Gabriel Horner
6042c8b112 refactor: keep testing concerns in tests
Move testing requirement to relevant test to make production code easier
to maintain. Where possible we should avoid helpers like util/node-test? as
they couple testing concerns with production code
2025-04-20 12:18:36 +08: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
Tienson Qin
a7e9d073cd chore: rename :property/* to :logseq.property/* 2025-01-15 14:59:08 +08:00
Tienson Qin
61a895fbd3 fix: tests 2025-01-13 16:31:39 +08:00
Tienson Qin
93a7034249 Remove more cases of :block/schema 2025-01-13 10:00:00 +08:00
rcmerci
b65a2d5c0f refactor: consistent alias of clojure.string 2025-01-03 16:45:10 +08:00
Gabriel Horner
bcdd162145 fix: queries with default values
and objects that are descendants of a tag with
a default-value property. Fixes
https://test.logseq.com/#/page/67551ea7-bd58-48bb-a0ea-8b976fa94423.
Also extended sqlite.build to allow closed value properties to
be configured with :build/properties
2024-12-09 12:11:06 -05:00
Tienson Qin
471d413d80 Rename checkbox-default-value to scalar-default-value 2024-11-25 14:38:22 +08:00
Gabriel Horner
ce18010b2b refactor: Decouple simple queries in db graph
from original *property rules by giving simple queries
their own rules. This allows simple queries to grow in functionality
and complexity without affecting other features. Also fixed
private-property rule wasn't working because deps weren't configured
2024-11-21 17:56:58 -05:00
Gabriel Horner
8864c3515f enhance: add tests for default value querying
Had to extend sqlite.build with :build/properties-ref-types for
:logseq.property/default-value's internal ref type needs
2024-11-21 16:31:48 -05:00
Tienson Qin
15e3ce9858 fix: graph parser tests 2024-11-19 18:08:17 +08:00
Gabriel Horner
1a7a2b25ed chore: add a couple assertions for between queries
from #11565. Also stop logging errors for valid between queries and
deleted unused test code
2024-11-11 16:32:35 -05:00
Gabriel Horner
0d3cf6c535 fix: db graph queries shouldn't run file graph filters
Throwing errors on unsupported filters for these makes it seem like we
support it when we don't. Better to be explicit. Also tweak
related tests so that file graph filters only run for file graphs
2024-11-08 14:32:07 -05:00
Tienson Qin
c97a51e85a fix: unit tests 2024-11-01 21:54:04 +08:00
Tienson Qin
7fcab4ac50 chore: rename page-tags-queries to tags-queries 2024-11-01 17:25:15 +08:00
Tienson Qin
ba3a8b84fb fix: query dsl tests 2024-11-01 09:47:21 +08:00
Gabriel Horner
be54ab98e6 fix: property simple queries by name
Maintains backwards compatibility for property filter queries
which fixes imported and handwritten property queries. Extended
sqlite.build and test-helper capabilities in order to test this.
Fixes LOG-3231
2024-09-17 14:39:30 -04:00
Gabriel Horner
16402e45c4 fix: remove buggy and inconsistent sort-by filter
In #11508 db graphs moved to a new table which improved but
changed how sort worked for queries. Better to deprecate
the text sort-by filter than to have a buggy and inconsistent sort
for queries
2024-09-12 16:57:35 -04:00
Tienson Qin
227437f852 fix: replace outdated :page type with :node type 2024-08-02 10:36:07 -04:00
Tienson Qin
452d0e8e2b fix: query dsl tests 2024-07-23 09:21:47 +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
e58f1221d2 fix: Insufficient bindings error after datascript upgrade
After upgrading our forked datascript from 1.5.3 to 1.7.1,
bindings in two of our rules behaved differently. The workaround
of adding an `and` where none was required before is sufficient.
Fixes LOG-3177
2024-06-27 16:15:08 -04:00
Gabriel Horner
ee77145caf fix: :checkbox property not working in simple queries and rules
Also fix booleans not rendering in query table
2024-06-18 10:38:09 -04:00
Gabriel Horner
5f2371486e fix: simple query for :number properties
also fixes deps db tests
2024-06-13 23:16:17 -04:00
Gabriel Horner
04b25a9240 chore: add basic tests for sqlite.build
and added a couple db-graph specific for query-dsl. Also
moved fns in pu that should be in db-pu
2024-06-10 11:52:39 -04:00
Gabriel Horner
9636fbe7ab fix: remaining query dsl tests for db graphs
Re-enable CI step for testing query-dsl and db graphs
2024-06-07 18:02:32 -04:00
Gabriel Horner
7f3e22c8eb fix: priority filters for db graphs 2024-06-07 17:58:49 -04:00
Gabriel Horner
039da828ac enhance: infer property schema and add new-pages from properties
for sqlite-build graphs. Also fixed numbered page query not working for
db graphs and related tests
2024-06-07 12:10:15 -04:00
Gabriel Horner
fd8bd1e3f2 fix: db graph test using :build/tags 2024-06-06 17:47:18 -04:00
Gabriel Horner
7e6f5878d6 fix: not filter query bug
for db graphs. not filter was returning all blocks
including all built-in properties. Also fixed a couple
tests to be db-graph compatible
2024-06-06 10:57:34 -04:00
Gabriel Horner
8f6f52d630 fix: sort-by filter for db graphs
Also fixed a dsl-query sorting bug where nil property values where
incorrectly being treated as greater than non-nil values. Also
fixed a bug where blocks with an explicit :block/created-at weren't
being set for sqlite-build
2024-06-05 16:57:51 -04:00
Gabriel Horner
29faedc4d0 fix: db graph tests with children, created-at properties
and journal pages
2024-06-05 14:47:38 -04:00
Gabriel Horner
e7f795103d fix: simple task queries and start fixing db dsl-query tests
Tests caught that task query wasn't working. Also disabled
namaspace test and rule for db graphs since they aren't supported
there
2024-06-04 15:53:36 -04:00
Tienson Qin
6eb6e60b55 Bring back namespaces/page merge/nested pages 2024-04-07 13:48:55 +08:00
Tienson Qin
60d4fca0ba wip: remove :block/name uniqueness for db based graphs
This PR also remove supports for:
1. merge pages when renaming a page to existing page
2. namespaces such as a/b/c
3. nested page such as [[a [[nested page]]]]

Pages merge might be added back depends on RTC, but it should be
decoupled from renaming, otherwise it's too complex.

Namespaces and nested pages have been contributed some critical bugs
that lead data-loss, they're so complex together with page alias,
it's just impossible to have a good test coverage and ensure the app
is stable, especially when page rename and RTC.
2024-04-04 15:57:48 +08:00
Tienson Qin
9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin
018e1ae8ee Merge branch 'master' into feat/db 2023-12-23 14:18:25 +08:00