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
{{ message }}
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
After #164, we parse lookup-refs; this ticket tracks rewriting lookup-refs in assertions. Assertions of the form
[[IDENT :db/ref-attr [:db/unique-attr VALUE]]]
are equivalent to finding the ENTID such that (ENTID :db/unique-attr VALUE) is an assertion, and then transacting [[IDENT :db/ref-attr ENTID]].
In the Clojure implementation, I collected all lookup-refs, wrote them all to a temporary table, and then handled them in a query. This is efficient when lookup up hundreds or thousands of lookup-refs, as happens when re-importing an already imported database. (In this case many lookup-refs match.) It's not efficient when we have only a handful of lookup-refs. A sophisticated implementation might have multiple regimes, sometimes using a temporary table and sometimes using a small bespoke query to do the lookups.
For the record, lookup-refs that don't resolve cause the Mentat transaction to fail (just like Datomic).
After #164, we parse lookup-refs; this ticket tracks rewriting lookup-refs in assertions. Assertions of the form
are equivalent to finding the
ENTIDsuch that(ENTID :db/unique-attr VALUE)is an assertion, and then transacting[[IDENT :db/ref-attr ENTID]].In the Clojure implementation, I collected all lookup-refs, wrote them all to a temporary table, and then handled them in a query. This is efficient when lookup up hundreds or thousands of lookup-refs, as happens when re-importing an already imported database. (In this case many lookup-refs match.) It's not efficient when we have only a handful of lookup-refs. A sophisticated implementation might have multiple regimes, sometimes using a temporary table and sometimes using a small bespoke query to do the lookups.
For the record, lookup-refs that don't resolve cause the Mentat transaction to fail (just like Datomic).