You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing entities can be achieved with (dissoc db (ref-to db my-entity)).
This is undocumented and it is a subtle operation, because:
It will leave dangling refs in entities who join my-entity
During query parsing pull ignores refs and colls of refs that do not resolve
Essentially using pull gives the expected result, but the db is an inconsistent state.
If db-level consistency is desirable, we could maintain an index during add and remove that'd allow a fast reverse lookup on the removed ref, to the refs and attributes pointing to it:
{<ingress-ref> {<egress-ref> <from-attr>}}
This would give us a add and remove operations in time linear to the number of joins.
The text was updated successfully, but these errors were encountered:
Removing entities can be achieved with
(dissoc db (ref-to db my-entity))
.This is undocumented and it is a subtle operation, because:
my-entity
pull
ignores refs and colls of refs that do not resolvepull
gives the expected result, but the db is an inconsistent state.If db-level consistency is desirable, we could maintain an index during
add
andremove
that'd allow a fast reverse lookup on the removed ref, to the refs and attributes pointing to it:{<ingress-ref> {<egress-ref> <from-attr>}}
This would give us a add and remove operations in time linear to the number of joins.
The text was updated successfully, but these errors were encountered: