Skip to content

Commit d057b02

Browse files
committed
Restore :coll format tag
1 parent e84ab45 commit d057b02

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

build.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:require [clojure.tools.build.api :as b]))
33

44
(def lib 'io.github.codeboost/xitdb-clj)
5-
(def version "0.1.1")
5+
(def version "0.1.2")
66
(def class-dir "target/classes")
77
(def basis (b/create-basis {:project "deps.edn"}))
88
(def jar-file (format "target/%s-%s.jar" (name lib) version))

src/xitdb/util/conversion.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
(integer? v) :key-integer
3636
(instance? java.time.Instant v) :inst
3737
(instance? java.util.Date v) :date
38+
(coll? v) :coll
3839
(string? v) :string))
3940

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

5052
(def true-str "#t")
@@ -70,7 +72,8 @@
7072
(if (nil? v)
7173
(byte-array (-> jdb .md .getDigestLength))
7274
(let [digest (.md jdb)
73-
fmt-tag (or (some-> v fmt-tag-keyword fmt-tag-value) "")]
75+
fmt-tag (or (some-> v fmt-tag-keyword fmt-tag-value)
76+
(throw (IllegalArgumentException. (str "Unsupported key type: " (type v)))))]
7477
;; add format tag
7578
(.update digest (.getBytes fmt-tag "UTF-8"))
7679
;; add the value

0 commit comments

Comments
 (0)