Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{:paths ["src" "test"]
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
io.github.radarroark/xitdb {:mvn/version "0.28.0"}}
io.github.radarroark/xitdb {:mvn/version "0.30.0"}}

:aliases
{:test {:extra-deps {io.github.cognitect-labs/test-runner
Expand Down
25 changes: 3 additions & 22 deletions src/xitdb/util/conversion.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
(:import
[io.github.radarroark.xitdb
Database Database$Bytes Database$Float Database$Int
ReadArrayList ReadLinkedArrayList ReadCountedHashMap ReadCountedHashSet ReadCursor ReadHashMap
ReadHashSet Slot Tag WriteArrayList WriteCountedHashMap WriteCountedHashSet WriteCursor
ReadCursor Slot Slotted Tag WriteArrayList WriteCountedHashMap WriteCountedHashSet WriteCursor
WriteHashMap WriteHashSet WriteLinkedArrayList]
[java.io OutputStream OutputStreamWriter]
[java.security DigestOutputStream]))
Expand Down Expand Up @@ -146,26 +145,8 @@
(validation/lazy-seq? v)
(throw (IllegalArgumentException. "Lazy sequences can be infinite and not allowed!"))

;; we only need to check for the read-only data structures,
;; because the writeable data structures inherit from them!

(instance? ReadArrayList v)
(-> ^ReadArrayList v .cursor .slot)

(instance? ReadLinkedArrayList v)
(-> ^ReadLinkedArrayList v .cursor .slot)

(instance? ReadHashMap v)
(-> ^ReadHashMap v .cursor .slot)

(instance? ReadHashSet v)
(-> ^ReadHashSet v .cursor .slot)

(instance? ReadCountedHashMap v)
(-> ^ReadCountedHashMap v .cursor .slot)

(instance? ReadCountedHashSet v)
(-> ^ReadCountedHashSet v .cursor .slot)
(instance? Slotted v)
(.slot ^Slotted v)

(map? v)
(do
Expand Down
Loading