Fork me on GitHub

@vale Your PostgreSQL issue is also fixed now on master -- there's a new, optional namespace that extends SettableParameter to provide automatic conversion to java.sql.Timestamp for java.util.Date, java.time.Instant, java.time.LocalDate, and java.time.LocalDateTime.


awesome you're a hero


Download 1.0.10 and let me know how it goes.


I still can't believe PostgreSQL can't do that conversion on its own... I mean, I verified the failure by adding tests (that only PostgreSQL failed!).


H2 and SQLite support automatic Java Time conversion out of the box (which was a pleasant surprise). PostgreSQL doesn't (of course) but neither do Apache Derby or HSQLDB. I haven't tested MS SQL Server or MySQL for that (but I know at least MySQL supports java.util.Date conversion!).


That'll be of interest I expect to anyone currently using Java Time types with next.jdbc.


That means there are no more open issues for 1.0.10 so I'll release that either later tonight or some time tomorrow


seancorfield/next.jdbc 1.0.10 is up on Clojars. On cljdoc, there's a broken link in Getting Started (to Tips & Tricks, unfortunately) that is already fixed on master.

parrot 3

I'll do a bigger announcement to various places later.


Thanks @seancorfield really appreciate all your hard work


@geek-draven Will that Statement support work for you, per the example in the docs? (jdbc/execute! (.createStatement con) ["... sql goes here ..."])


@seancorfield yep, that should be perfect, I'm just about to get one of the devs to update the code they were working on to give it a go


Cool. It's 1am here and I'm heading to bed but feel free to drop thoughts/feedback in this channel and I'll catch up with it on the morrow.


@seancorfield would it be theoretically possible to make a resultset processing function that returns a raw resultset in next.jdbc ?


@U0JEE2R26 I'll take a look when I'm at my desk in an hour or so.


@U0JEE2R26 OK, so the problem you'll have there is that the ResultSet object is only valid in the context of the open connection/statement from which it was retrieved -- both next.jdbc and close statements and connection after they're "done" which gives you a very limited window of opportunity to do anything useful with the ResultSet object. My recommendation would be to use plan and do everything you need with the results inside the reducing function you apply -- that is almost a raw ResultSet object, just wrapped in a thin veneer of Clojure hash map behavior.


(for each row -- so you still couldn't get at the actual result set object there)


Can you explain your use case so I can suggest alternative approaches?


@U0522TWDA Good catch. Good job it's only a docstring! I'll fix as soon as I am at work!

👍 1

Thank you for the feature BTW, now I can delete a few lines of code :)


Docstring updated on master. Thank you!