Fork me on GitHub

Yes, you’re at the mercy of the underlying jdbc libraries, both in Clojure and in the Java jdbc driver library. Here’s an older issue with a few links: I’m not sure what the current story is for or next.jdbc for calling stored procedures. Depending on your needs, you may need to use Java interop.


That is, of course, the nice thing about Clojure…Java interop can get you there when necessary! 😄


You should be able to simply execute the appropriate SQL to call the procedure via either c.j.j. or next.jdbc. Currently, the major limitation is that you can only get a single result set back, without dropping down to Java interop. That's something that I've looked at for both libraries but just haven't come up with a really good solution for that -- it's a strange-shaped puzzle.


I'm toying with CallableStatement support but a) designing an idiomatic solution to something that inherently uses mutable parameters is a bit hard 🙂 and b) I have never used stored procedures in my entire career and I think they're a bad idea in principle because it is inherently hard to version control such things (because you essentially need to version the contents of a database 😐 ).


The main issue is designing a good solution to the whole problem of something returning multiple results (JDBC stuff is fairly unpleasant in some of these areas).