Since a node's namespace is part of its name, moving a node from one namespace to another is the same as renaming a node. To keep renames a simple operation, we should change how we store queries to use node ids rather than node names.
That is, instead of storing the node query as:
SELECT
a1,
b1
FROM default.repair_types
We replace default.repair_types with the node id (prepended with some characters to indicate that this is a node reference:
SELECT
a1,
b1
FROM nref.12332
This node reference can then be parsed at node query retrieval time and replaced with the node name. This makes it so that renaming nodes will be a single operation rather than a series of operations where we parse and fix different parts of the node graph.
[ ] Change how we store the node query from node names to node ids
[ ] Prepare a migration script to convert all existing node queries to the new format
[ ] Enable editing of the node name in the backend
Since a node's namespace is part of its name, moving a node from one namespace to another is the same as renaming a node. To keep renames a simple operation, we should change how we store queries to use node ids rather than node names.
That is, instead of storing the node query as:
We replace
default.repair_types
with the node id (prepended with some characters to indicate that this is a node reference:This node reference can then be parsed at node query retrieval time and replaced with the node name. This makes it so that renaming nodes will be a single operation rather than a series of operations where we parse and fix different parts of the node graph.