Fork me on GitHub
#babashka
<
2021-11-25
>
Nicolas Estrada15:11:31

Hello again, when building bb with BABASHKA_FEATURE_JDBC, we don't get access to the namespaces next.jdbc.prepare or next.jdbc.date-time?

Nicolas Estrada15:11:02

Ok by that you mean forking, and adding the required namespaces... All I really want is to use the protocol definitions for passing inst into queries like what is already done in next.jdbc.date-time

(extend-protocol p/SettableParameter
  ...
  ;; this is just to help PostgreSQL:
  java.util.Date
  (set-parameter [^java.util.Date v ^PreparedStatement s ^long i]
    (.setTimestamp s i (Timestamp/from (.toInstant v))))
  ;; but avoid unnecessary conversions for SQL Date and Timestamp:
  java.sql.Date
  (set-parameter [^java.sql.Date v ^PreparedStatement s ^long i]
    (.setDate s i v))
  java.sql.Timestamp
  (set-parameter [^java.sql.Timestamp v ^PreparedStatement s ^long i]
    (.setTimestamp s i v)))

Nicolas Estrada15:11:57

I'm willing to work off of a fork, and perhaps file a MR if it doesn't increase binary size too much

borkdude15:11:04

sure. I don't care too much about the binary size in non-default features

apt22:11:34

Hey folks. x-posting, hope it’s fine since I don’t know where the issue is. https://clojurians.slack.com/archives/C9BT75KRC/p1637877966002200

borkdude22:11:41

@andre.peric if you are able to send an expression to the socket repl with netcat then you know it's not an issue with bb

👍 1