[tx] Accept [a v] notation for lookup refs in entity position #152
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#152
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is follow-up tracking https://github.com/mozilla/mentat/pull/382#pullrequestreview-28255925. In #382, I accept only
(lookup-ref a v)
for lookup-refs in both entity and value position (e
andv
in a[:db/add e _ v]
assertion). That's contrary to Datomic, which accepts embedded vectors like[a v]
in both locations, treating ambiguity in some ad-hoc way. (See the discussion in #183 for notes on this ambiguity.)This ticket tracks accepting an embedded vector
[a v]
in the entity position only. We suspect that the majority of lookup refs are entity refs in this form, and it's both shorter to type and handy to agree with Datomic.To implement this, you'll need to:
entid_or_lookup_ref_or_temp_id
is still used only to parse entity positions;vector_lookup_ref
function accepting[a v]
around8adb6d97fd/tx-parser/src/lib.rs (L72)
;8adb6d97fd/tx-parser/src/lib.rs (L88)
;