diff --git a/clj/db/pg.clj b/clj/db/pg.clj index 4e2b9d2..0b6dfcd 100644 --- a/clj/db/pg.clj +++ b/clj/db/pg.clj @@ -284,10 +284,10 @@ params)] (dotimes [i n] (let [[oid p len fmt] (nth cells i)] - (ffi/write types :uint (* i os) oid) - (ffi/write values :pointer (* i ps) p) - (ffi/write lengths :int (* i is) len) - (ffi/write formats :int (* i is) fmt))) + (ffi/write types :uint oid (* i os)) + (ffi/write values :pointer p (* i ps)) + (ffi/write lengths :int len (* i is)) + (ffi/write formats :int fmt (* i is)))) [types values lengths formats (into [types values lengths formats] (remove (fn [p] (ffi/null? p)) (mapv second cells)))])))) diff --git a/deps.edn b/deps.edn index ff15850..6e8a651 100644 --- a/deps.edn +++ b/deps.edn @@ -1,4 +1,9 @@ -{:paths ["clj"] +{;; jolt.ffi/write takes the value BEFORE the offset as of jolt 0.8.0, and the + ;; two spellings are both integers — an older runtime writes to the wrong + ;; place rather than failing. Declare the floor so it refuses instead. + :jolt/min-version "0.8.0" + + :paths ["clj"] ;; clojure.jdbc is the API this library exposes: the published library running on ;; the java.sql shim in db.jdbc-shim, rather than a reimplementation of it here.