Closed purrgrammer closed 4 years ago
That looks good to me. Can you add a version with the same behavior for cljs? We are trying to stay compatible so that we will be able to port the datahike frontend to cljs over distributed indices in the longer run.
IIUC the default comparison in CLJS uses the lexicographical comparison of the (lowercased) UUID string so it should be equivalent. I needed to add compare-uuid
for the JVM because the default ordering for java.util.UUID
is broken.
Nice work, thanks. I have put a new 0.1.5-SNAPSHOT
release on clojars. If you need a stable release, please open an issue.
The default comparison function for
java.util.UUID
does not do an unsigned comparison as it should, which is an acknowledged bug that won't be fixed https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7025832This commit implements unsigned comparison for
java.util.UUID
types.