Some more database-related stuff: https://clojurians.slack.com/archives/C8NUSGWG6/p1785274838737009
just in time 😄 I had started exploring biff v2 couple of days ago to use for my side project and trying out spikes. Thanks!
🙌 let me know if you hit anything weird with it, still in prerelease so now's a good time to change stuff if needed!
two small bugs(?) my patched version of admin.clj
(defn- day-key
"Convert an instant to a tick/date in the given timezone."
[instant tz]
(if (nil? instant) ;; nil value was throwing error
(do
(t/date))
(t/date (t/in instant tz))))
sqldef.clj
(defn ensure-sqldef-binary! [{:biff.sqlite/keys [sqldef-version bin-dir]}]
(let [{:keys [os arch]} (impl.bin/platform-info)
asset-name (str "sqlite3def_"
(case os
:linux "linux"
:macos "darwin"
:windows "windows")
"_"
(name arch)
"."
(case os
(:windows :macos) "zip" ;; for macos, it is a zip file
"tar.gz"))
url (str ""
sqldef-version "/" asset-name)]
(impl.bin/ensure-binary!
{:executable-basename "sqlite3def"
:bin-dir bin-dir
:get-version (fn [command]
(-> (process/exec command "--version")
(str/split #"\s")
first))
:target-version sqldef-version
:url url}))) thanks--I just pushed some commits with those fixes (though instead of updating day-key, I modified the call sites to filter out events without an instant)