mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
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.
This commit is contained in:
@@ -412,21 +412,6 @@ tags: [[other]]
|
||||
(dsl-query "(page nope)")))
|
||||
"Correctly returns no results"))
|
||||
|
||||
(deftest namespace-queries
|
||||
(load-test-files [{:file/path "pages/ns1.page1.md"
|
||||
:file/content "foo"}
|
||||
{:file/path "pages/ns1.page2.md"
|
||||
:file/content "bar"}
|
||||
{:file/path "pages/ns2.page1.md"
|
||||
:file/content "baz"}])
|
||||
|
||||
(is (= #{"ns1/page1" "ns1/page2"}
|
||||
(set (map :block/name (dsl-query "(namespace ns1)")))))
|
||||
|
||||
(is (= #{}
|
||||
(set (map :block/name (dsl-query "(namespace blarg)"))))
|
||||
"Correctly returns no results"))
|
||||
|
||||
(deftest empty-queries
|
||||
(testing "nil or blank strings should be ignored"
|
||||
(are [x] (nil? (dsl-query x))
|
||||
|
||||
Reference in New Issue
Block a user