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
graph-parser is primarily a file graph dep that is maintained separately
from db graphs. We want to move as many namespaces out of it as
possible. Also moved differing count assertions to
their respective tests
There're at least two use cases for same page original names:
1. multiple clients can create pages with the same title
2. multiple tagged blocks can have the same :block/original-name
large graph chunking assumed a certain tx order which isn't guaranteed.
There are also some edge cases where blocks could get separated from
each other which are now fixed. Also fixed a bug with validating user
properties and made small enhancement for query script
to allow for imported properties to have a different namespace than the
one the editor generates. Update schema example graph which now imports
properties as :schema.property/X
Fixes building of :url and :number closed value properties which
affected properties graph and would effect future built-in properties.
Also simplify translation of property values by keeping it only
in create-graph namespaces
Addressed fixmes for db-based-graph fns that were inlined to prevent
circular dependencies b/n db-property and sqlite-util. Moved multi
graph fns to db-property-util and existing db-property-util to
db-property-build to address this