Skip to content
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

Warn on unindexed :avet seq `(d/datoms db :avet ...)` instead of => nil #344

Closed
theronic opened this issue Mar 22, 2020 · 1 comment
Closed

Comments

@theronic
Copy link

@theronic theronic commented Mar 22, 2020

(d/datoms db :avet :some-attr) returns nil if :some-attr is unindexed. This is mentioned in the docs, but it's caught me twice now. Would it be possible for d/datoms to warn me when trying to seq over an unindexed attribute, or perhaps trigger a slow scan instead of returning nil?

@tonsky
Copy link
Owner

@tonsky tonsky commented Mar 23, 2020

Probably a good point. I think it should throw. d/datoms is index access, if there’s no index, no point emulating it. PR?

@tonsky tonsky closed this in a155fd1 Jun 23, 2020
@tonsky tonsky added this to the Summer of Bugs milestone Jun 24, 2020
@tonsky tonsky removed the Summer of Bugs label Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.