Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-07 Thread Ralf Schmitt
Sean Corfield writes: > Of course. The :auto-commit? parameter has to be passed to > with-db-connection so that connections and their state are properly > scoped, so that connections don’t “randomly” change their behavior > half way through a with-db-connection block because a

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-07 Thread Ralf Schmitt
Ralf Schmitt <r...@systemexit.de> writes: >> (into [] (take 2) (jdbc/query db query {:fetch-size 500 :auto-commit? >> false})) > > Sorry, this one works. will test with reducible-query tomorrow. reducible-query also works (and it also ignores the :auto-commit? param

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-06 Thread Ralf Schmitt
Sean Corfield writes: >> The fact that the code currently sets the flag when opening the >> connection is an implementation detail. It should not leak into the API > > On the contrary – it is important to identify the scope of the connection and > the scope of when

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-06 Thread Ralf Schmitt
Sean Corfield writes: > You said: > > But when the database is already connected like in > > (jdbc/with-db-connection [db db] > (jdbc/query db > query > {:result-set-fn (fn [coll] (doall (take 2 coll))) > :fetch-size 100 >

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-06 Thread Ralf Schmitt
Ralf Schmitt <r...@systemexit.de> writes: > Sean Corfield <s...@corfield.org> writes: > >> The :auto-commit? option is supported in 0.7.0-beta5 which should hit >> Maven Central by tomorrow (or maybe late tonight). Please let me know >> if it solves the stre

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta1

2017-07-06 Thread Ralf Schmitt
Sean Corfield writes: > The :auto-commit? option is supported in 0.7.0-beta5 which should hit > Maven Central by tomorrow (or maybe late tonight). Please let me know > if it solves the streaming problem. yes, it does work. Thanks. -- Cheers Ralf -- You received this

Re: JDBC Connection auto-commit?: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-05 Thread Ralf Schmitt
Sean Corfield writes: > Rather than doing something that requires a dependency on specific JDBC > driver classes, it seems that if an :auto-commit option in the db-spec were > honored by get-connection you would get what you needed: > > (into [] (take 2)

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-05 Thread Ralf Schmitt
Sean Corfield writes: >> The required steps to setup streaming are different from database to >> database and I guess they may change with the driver version being used. > > This is really the crux of the problem here – I’m not sure what java.jdbc can > do generically to make

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Ralf Schmitt
Sean Corfield writes: > Did you try this: > > (jdbc/with-db-connection [conn config/db] > (.setAutoCommit (jdbc/db-find-connection conn) false) > (into [] (take 2) (jdbc/reducible-query conn query {:fetch-size 500})) > > (I don’t have your sort of data set to

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Ralf Schmitt
Sean Corfield writes: > A new function, reducible-query, has been added that accepts a db-spec > and a SQL/parameters vector, and returns a “reducible collection”. The > query doesn’t actually run until you reduce it. At that point, it sets > up the PreparedStatement, runs the

Re: Let and For Doesn't Execute - Where Is My Misunderstanding?

2017-05-17 Thread Ralf Schmitt
Kevin Kleinfelter writes: > I'm stumped by the behavior of the following code fragment. Can someone > help me understand what's happening? > > *This code*: > (println "Holding:" (:class holding)) > (let [t (:class holding)] > (for [x t] (println "here"

Re: [ANN] Virgil 0.1.6

2017-03-16 Thread Ralf Schmitt
Zach Tellman writes: > I figured it was worth reminding everyone that this library > exists: https://github.com/ztellman/virgil. Hi Zach, thanks for the reminder. I've read about Virgil some weeks ago, and today I thought I could use this project, but couldn't remember the

Re: Problem with buddy.core.keys/private-key in uberjar

2016-12-21 Thread Ralf Schmitt
Ray Miller writes: > This works as expected when invoked with `lein run`, but if I create an > uberjar with `lein do clean, uberjar` and invoke with `java -jar ...` I get > the following exception: > > Exception in thread "main" org.bouncycastle.openssl.PEMException: Unable to

Re: Serialising/deserialising mixed Clojure and Java datastructures

2016-05-09 Thread Ralf Schmitt
"'Simon Brooke' via Clojure" writes: > I'm working on some complex analysis where it takes about twelve hours to > construct the model to be analysed. Once it's constructed I'm doing various > interactive things to explore it, but I can't currently persist it in a >

Re: [ANN] excel-templates 0.3.2 release available

2016-03-22 Thread Ralf Schmitt
Tom Faulhaber writes: > I want to thank the users who submitted bug reports. The pull requests and > nice, clear bug reports made most of the problems easy to fix. > > *What is Excel Templates anyway?* > > Excel Templates is a library that lets you build beautiful

Re: Need some direction on writing my .Net build script using clojure

2015-12-18 Thread Ralf Schmitt
Erlis Vidal writes: > Hi all, > > I would like to start using clojure at my workplace and I think I've found > a great opportunity. I need to write the build script for our .Net solution > and it will great if I can use clojure for this task. > > What I would like to know

Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Ralf Schmitt
Alex Miller writes: > Something like this can work but you need to have the proper path in the > local maven_repository. You have the repository named local. Inside the > repo, every artifact has a groupID (the first part of the dependency), the > artifactID, and the

Re: ANSI in Eclipse CounterClockwise REPL

2015-09-14 Thread Ralf Schmitt
Roy Riggs writes: > Just started teaching myself Clojure, there's one thing that seems to elude > me. I'd like to be able to pretty print output from my project in the > REPL. Clearly it already supports coloring text somehow, but I can't > figure out how to do it myself

Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Ralf Schmitt
Lawrence Krubner writes: >> lein-localrepo helps with installing jar files into the >> local maven repository > > But they give examples like this: > > lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6 > > If I had that info I probably would not need to ask

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Ralf Schmitt
Johanna Belanger johanna.belan...@gmail.com writes: Could anyone tell me how they got from enterprise Java to Clojure? Maybe the following links provide some useful information: http://blog.juxt.pro/posts/selling-clojure.html http://www.pitheringabout.com/?p=693

Re: Code Review

2015-05-15 Thread Ralf Schmitt
Sven Richter sver...@googlemail.com writes: HI, I just posted a question to stackoverflows code review page:http://codereview.stackexchange.com/questions/90809/remove-lines-from-a-2d-vec-in-clojure As there is not much traffic regarding clojure I also double post to this list in the hope

[ANN] authenticator 0.1.1

2014-08-17 Thread Ralf Schmitt
Hi, I've released authenticator 0.1.1. authenticator is a small Clojure library that can be used to easily implement a java.net.Authenticator. Please visit https://github.com/schmir/authenticator for more information. -- Cheers Ralf -- You received this message because you are subscribed to

Re: Auto reloading of dependencies with cider

2014-06-22 Thread Ralf Schmitt
Mark P pierh...@gmail.com writes: What do other people generally do here? I suspect there is a commandline way of getting lein to do this for me. Is that what people do? Or do people just make sure they do C-c C-k in each relevant buffer? (But isn't this error prone - ie if you forget

Re: How can I improve this?

2014-01-10 Thread Ralf Schmitt
Colin Yates colin.ya...@gmail.com writes: This and Jonas' are my current favourites, for what that's worth. Keep the suggestions coming! here's another one that uses reductions. formatter would need to be adapted a bit, since it currently also adds _0 for the first name seen: (defn

[ANN] es-nozzle 0.3.0 - elasticsearch document ingestion

2013-09-26 Thread Ralf Schmitt
(or use the elasticsearch mailing list) We're excited to get feedback about this release, so please give it a shot and let us know about your experience. -- Cheers Ralf Schmitt -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

[ANN] iniconfig 0.2.0 released

2013-08-20 Thread Ralf Schmitt
Hi all, I've just uploaded iniconfig 0.2.0 to Clojars. iniconfig is minimal Clojure library designed to read ini files. It uses the number sign '#' as comment character and allows multi-line values. iniconfig and it's documentation can be found on github: