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

fix: error when find-datom on empty-db #477

Closed
wants to merge 1 commit into from

Conversation

RCmerci
Copy link
Contributor

@RCmerci RCmerci commented Jul 20, 2024

d/find-datom will throw an error when calling on an empty-db.
Is this behavior by design or a mistake?

> (d/find-datom (d/empty-db {:age {:db/index true}}) :eavt)
Execution error (NullPointerException) at me.tonsky.persistent-sorted-set/seek (persistent_sorted_set.clj:51).
Cannot invoke "me.tonsky.persistent_sorted_set.Seq.seek(Object)" because "seq" is null

I expect it to return nil when an empty-db is used as arg to find-datom.

@tonsky tonsky closed this in ddbdca6 Jul 22, 2024
tonsky added a commit that referenced this pull request Jul 22, 2024
@tonsky
Copy link
Owner

tonsky commented Jul 22, 2024

Thanks! Pushed 1.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants