Re: [ANN] Yesql 0.5.1 Released.

2015-10-09 Thread Michael Blume
The simple answer is https://clojure.github.io/clojure/javadoc/clojure/java/api/package-summary.html But since Yesql works by producing Clojure vars in a namespace, doing *everything* from Java sounds painful -- you'd probably want to sneak in like one Clojure file with a bunch of defquery stateme

Re: [ANN] Yesql 0.5.1 Released.

2015-10-09 Thread Charles Harvey III
Here's another crazy question... How would I use this from Java? Seriously though. I might be forced to use Java on my next project but I really like Yesql over MyBatis (the closest thing in Java Land). Has anyone done it before and can show a small example? I don't want to give up my .sql file

Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Robin Heggelund Hansen
If you pass the db connection to defqueries, you are essentially storing global state. The point of component is to not have global state. So yeah, you shouldn't pass the db-connection to defqueries, but pass the connection to every db-call. fredag 9. oktober 2015 03.01.29 UTC+2 skrev Charles H

Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Charles Harvey III
That's what I have now and I was wondering if it could/should change now that I can pass the connection into defqueries. It seems like it could change. But, component is just a place to keep state/global values. The connection being one of them. defqueries must be storing it somewhere (an atom?

Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Robin Heggelund Hansen
For a component-based workflow, you wouldn't send in the db-spec with the defqueries. You would do it when calling a query. (defqueries "somepath") (defn code [component] (some-query {:name "Robin", :age 6} {:db (:db-spec component)})) torsdag 8. oktober 2015 15.34.09 UTC+2 skrev Charles Harv

Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Charles Harvey III
I have a question that I hope you can answer about using Yesql with Component. Currently I pass the db-spec into my endpoint and then pass it into each call to a query. Now that I can call defqueries with the db-spec, how do I send that in from component? Sorry for asking, I am new to both libr

Re: [ANN] Yesql 0.5.1 Released.

2015-10-08 Thread Josh Kamau
Thanks a million! Having come from mybatis world, this really helps. Josh. On Thu, Oct 8, 2015 at 8:56 AM, Andrey Antukh wrote: > Great work! > > Any change for have yesql decoupled from java.jdbc? I really want to use > it, but with other jdbc libraries... > > > Regards > Andrey > > On Thu, O

Re: [ANN] Yesql 0.5.1 Released.

2015-10-07 Thread Andrey Antukh
Great work! Any change for have yesql decoupled from java.jdbc? I really want to use it, but with other jdbc libraries... Regards Andrey On Thu, Oct 8, 2015 at 12:55 AM, Kris Jenkins wrote: > Yesql - the Clojure library for using SQL - has just released v0.5.1. > > The API is much improved -

[ANN] Yesql 0.5.1 Released.

2015-10-07 Thread Kris Jenkins
Yesql - the Clojure library for using SQL - has just released v0.5.1. The API is much improved - especially if you're using queries with many arguments - so see the migration guide if you're upgrading: My thanks to everyone who has contributed to this release, and for all the users who've been