-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: pull: attr-option doesn't work inside map-spec #578
Comments
Thank you for reporting this :) It looks like our parser is not up-to-date with the Datomic pull grammar. We should be able to fix this soon. |
Also, have discovered only now,
Seems like a different kind of error. Please tell, is it worth a separate issue? Or maybe it is somewhat intended difference from datomic |
Parser knows about
But seems like a strange feature to have for only present on entity attributes :) |
Oops, my bad I will read messages properly. With :misssing property defined everything works fine. Anyway, assuming the label "datomic compat", some validity of question remain, because in datomic Now I'm stop spamming here. Please, let me know if there is a need to make a proper issue for :default thing. |
Allowing We usually try to stay compatible with Datomic, so I guess we will want to support that sooner or later, but to me it seems like a strange feature to have, so that wouldn't be exactly a priority. |
Btw, replikativ/datalog-parser#27 will update the parser and as soon as this is included in datahike the options should work like in datomic again. |
Agree with "strange" here. Throw in the face if I misspell some attribute seems like more preferable behavior to me. So, here is an #579 . A good candidate for wontfix it is, but let it be for future reference :) |
What version of Datahike are you using?
0.6.1521
What version of Java are you using?
openjdk version "19.0.1" 2022-10-18
What operating system are you using?
Arch WSL (Windows 11)
What database EDN configuration are you using?
{:store {:backend :mem}}
Describe the bug
In pull pattern attr-option (:as, :limit) works:
but attr-option in map-spec throws with
Expected (attr-name | limit-expr)
:See example in "How can the behaviour be reproduced?"
N.B.
legacy-limit-expr
in terms of Datomic works (e.g.(pull (db conn) '[{(limit :attr 1) [*]}] id)
), so it's clear what exception is talking about.What is the expected behaviour?
Returns result with
:attr
substituted with"attr"
How can the behaviour be reproduced?
For schema:
And seed data:
This pull works:
This one doesn't:
(Both works in Datomic dev-local)
The text was updated successfully, but these errors were encountered: