sql

Roma 2023-11-04T21:14:50.116329Z

Hello. Is there any way to combine next.jdbc.optional with next.jdbc/unqualified-snake-kebab-opts? I'd like to get unqualified kebab keys with nil omitted.

Roma 2023-11-04T21:25:00.501829Z

I think I've found a way:

(defn- as-unqualified-kebab-maps
  [rs opts]
  (jdbc.optional/as-unqualified-modified-maps rs (assoc opts :label-fn ->kebab-case)))

(def ^:private default-opts
  (assoc jdbc/unqualified-snake-kebab-opts :builder-fn as-unqualified-kebab-maps))
sorry for the noise 🙂