LionWeb-io / specification

Specifications of the LionWeb initiative
http://lionweb.io/specification/
6 stars 0 forks source link

Explicit delete operation in bulk API? #221

Open enikao opened 6 months ago

enikao commented 6 months ago

In bulk API, we delete a node by not mentioning the deleted node id in children/annotations of its parent on calling store() The deleted node then becomes an orphan (#219), if supported. Otherwise, the deleted node is gone (#220).

We could have an explicit delete() operation in different variants:

Variant A: delete() can only delete orphans, thus is only part of Trash API (#217).

delete just makes sure orphans are really gone (#220). If the repository does not support orphans, this call is a no-op.

Variant B: delete() can delete both regular nodes and orphans

Any explicitly deleted node would be completely gone (#220).

If we delete a node, we implicitly remove it from its parent's containment/annotation.

joswarmer commented 6 months ago

If we decide to have a "delete" for nodes, I think the "delete" for orphans should be a different operation, also belonging to a different API (the not-yet-existing) orphans API. And I would probably give it a name like "cleanup" in the orphan API (because it is already "deleted"). I would then expect that an explicitly deleted node (which is in the model before the delete call) becomes an orphan.

enikao commented 6 months ago

Relates to #228

enikao commented 6 months ago

Decision: Not have delete() for now, maybe add it if missing

Implication: Bulk deletes nodes implicitly