property-value is widely being used to refer to the entity or value
associated with a property entity. Naming the content of a
property-entity :property/value is confusing. property-value content is
a unique name and consistent with :block/content. Also rename related
fns which had similarly confusing names
frontend.test.helper was accidentally coupled to sqlite3 via
logseq.outliner.db-pipeline. Split out sqlite3 dependent fns to
logseq.outliner.cli so it's clear this shouldn't be coupled to frontend
This ns is file graph specific so it should be in a file-graph
specific ns. Its current location was confusing as it was next to
other namespaces in frontend.worker.file.* that are not
file graph specific. Also moved related tests to correct location
Converted inferred graph to an EDN file now that this task exists. Also
merge last of tasks.create-graph to relevant ns so that external users
can also create such tasks
Also renamed block-level keys that are specific to the ns to have
a :build namespace. A lot easier to read, maintain and extend later.
Also cleaned up page naming to consistently require :block/original-name
load-test-files helper for db graphs and deps.
Most of this ns is split off from create-graph.
Migrated pipeline-test to correct outliner dep and
moved previous pipeline-test to correct db dep
This is important as a user's ontology (properties + classes) is now describable
with unique identifiers. This will allow for easy sharing and
importing of ontologies between users.
Also <create-class! now exists to create classes consistently. Will
be helpful when we want to provide some validation for classes
unable to load. Subtle bug with transacting. Now that user properties
modify schema, schema tx needs to be separated out from use of new
schema. Also add :block/refs to schema debug file and other minor cleanup
nbb was only handling path-refs previously. Can remove hacky
managing of refs in create-graph. Still a TODO to fix schema graph
lazy loading bug. Related to LOG-2819
Lazy loading of refs for classes isn't supported in the UI yet so
no need to self-inflect this. Also can move schema graph from :string
to :default usage now
use avt-coll data in update-op to simplify the code.
Handle different attributes in a unified way, instead of
dealing with each different attribute separately
Replace [:block/schema :properties] with ref type property/schema.properties.
This commit also introduces :logseq.class/base so that all the other
classes will be its children.
Fixes some generation cases like 1 or 2 pages with 1000 blocks.
Larger generation with 10k+ blocks still fail b/c of block/order
generation. Also remove deleted :block-id-fn
Finally no need to worry about parent-left conflicts and broken chain.
With :block/order, we only need to re-compute new orders for siblings
with same order (it can happens if there're bugs in our code, or
updates from rtc), but it doesn't break UI.
Another huge potential benefit after discussing with Zhiyuan is:
Ee might be able to simplify both RTC and undo/redo, currently, we
need to handle each new op for both of them, with recently
refactorings like properties being db attributes, :block/order
is a string instead of a ref, we can handle most property value
conflicts using last-write-wins, and others (e.g. :block/parent,
property with :default type) specifically.
I haven't fixed the issues of using :block/left in RTC and undo/redo,
because we might change both soon.
This allows imported and eventually user classes to have db idents.
Updated schema example graph which now imports classes as
:schema.class/X. Also fix schema properties which were removed from
the debug file and remove unused property uuids