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 build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:require [clojure.tools.build.api :as b]))

(def lib 'io.github.codeboost/xitdb-clj)
(def version "0.1.1")
(def version "0.1.2")
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
Expand Down
5 changes: 4 additions & 1 deletion src/xitdb/util/conversion.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
(integer? v) :key-integer
(instance? java.time.Instant v) :inst
(instance? java.util.Date v) :date
(coll? v) :coll
(string? v) :string))

;; map of logical tag -> string used as formatTag in the Bytes record.
Expand All @@ -45,6 +46,7 @@
:nil "nl" ;; TODO: Could use Tag/NONE instead
:inst "in"
:date "da"
:coll "co"
:string "st"})

(def true-str "#t")
Expand All @@ -70,7 +72,8 @@
(if (nil? v)
(byte-array (-> jdb .md .getDigestLength))
(let [digest (.md jdb)
fmt-tag (or (some-> v fmt-tag-keyword fmt-tag-value) "")]
fmt-tag (or (some-> v fmt-tag-keyword fmt-tag-value)
(throw (IllegalArgumentException. (str "Unsupported key type: " (type v)))))]
;; add format tag
(.update digest (.getBytes fmt-tag "UTF-8"))
;; add the value
Expand Down