sql

All things SQL and JDBC...
serioga 2020-02-26T10:31:24.010900Z

Hello @seancorfield Did you consider next.jdbc API for with-transaction where sym shadows name of transactable ?

; Current API
(with-open [conn (jdbc/get-connection my-datasource)]
  (jdbc/with-transaction [tx conn]
    (jdbc/execute! tx ...))) ; what is allowed to do with `conn` here?

; Alternative - the lexical scope of `conn` is changed
(with-open [conn (jdbc/get-connection my-datasource)]
  (jdbc/with-transaction [conn]
    (jdbc/execute! conn ...))) ; outer `conn` not accessible here

orestis 2020-02-26T12:16:40.012Z

@dharrigan Let me know how that works. I had a look at how the nilenso extensions work and saw a bunch of numbers that presumably deal with precedence and clause ordering. I kind of shied away of HoneySQL at that point.

orestis 2020-02-26T12:17:43.013300Z

We had a nice argument in the team the other day, should the "sugar" help you in the easy case or the hard case? We'll investigate Walkable next since it seems to lift the concern from SQL to another level, whereas HoneySQL still asks you to write SQL, just in another format...