Re: Current best-of-breed JDBC libraries?
We tried Korma but found it too limiting for our needs. Later, I saw this tweet: https://twitter.com/ibdknox/status/557236505639665664 We are currently using HoneySQL to generate SQL which then gets passed to clojure.java.jdbc. e On Tue, Feb 24, 2015 at 9:04 AM, Colin Yates colin.ya...@gmail.com wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
I've done a fair bit of complex SQL with honeysql, and must say it rocks. It could use a bit more documentation where extending it with new clauses is concerned, though. For my latest project being able to manipulate the datastructures that are rendered to SQL was crucial, and honeysql was the only one that fitted that bill. Basically, it generates SQL scripts to relink foreign key references to clean up duplicates in a database. It takes a honeysql select query with (at least) a from table, a group-by and an order-by clause as a base definition what are to be considered doubles, and in which order records should be preserved. In combination with JDBC metadata that query effectively gets rewritten to generate: A temporary replacement table Queries to unify unique indexes, to prevent clashes when foreign key references are updated Queries to update all foreign key references Delete statements to remove all duplicates To create the best performing, but still database independent SQL, I had to extend honeysql with extra clauses like OVER and PARTITION BY. I wouldn't say it was a breeze, but seemed to work very well. Compared to the previous version I wrote in Ruby (without these clauses), the SQL now only scales with the amount of unique / foreign key constraints, instead of the amount of doubled sets. That cut down SQL to (sometimes) GB's of script to around a few 100 lines of SQL, and on one occasion, a runtime from 19 hours to 1.5 minutes. All in all, pretty impressed with Clojure and HoneySQL. On Tuesday, February 24, 2015 at 3:04:36 PM UTC+1, Colin Yates wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
+1 to all of that. We are using honeysql to serve our ad-hoc reporting engine. Composing data structures for the win. On 24 February 2015 at 15:12, Niels van Klaveren niels.vanklave...@gmail.com wrote: I've done a fair bit of complex SQL with honeysql, and must say it rocks. It could use a bit more documentation where extending it with new clauses is concerned, though. For my latest project being able to manipulate the datastructures that are rendered to SQL was crucial, and honeysql was the only one that fitted that bill. Basically, it generates SQL scripts to relink foreign key references to clean up duplicates in a database. It takes a honeysql select query with (at least) a from table, a group-by and an order-by clause as a base definition what are to be considered doubles, and in which order records should be preserved. In combination with JDBC metadata that query effectively gets rewritten to generate: A temporary replacement table Queries to unify unique indexes, to prevent clashes when foreign key references are updated Queries to update all foreign key references Delete statements to remove all duplicates To create the best performing, but still database independent SQL, I had to extend honeysql with extra clauses like OVER and PARTITION BY. I wouldn't say it was a breeze, but seemed to work very well. Compared to the previous version I wrote in Ruby (without these clauses), the SQL now only scales with the amount of unique / foreign key constraints, instead of the amount of doubled sets. That cut down SQL to (sometimes) GB's of script to around a few 100 lines of SQL, and on one occasion, a runtime from 19 hours to 1.5 minutes. All in all, pretty impressed with Clojure and HoneySQL. On Tuesday, February 24, 2015 at 3:04:36 PM UTC+1, Colin Yates wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
I'm currently using and maintaining this two: https://github.com/niwibe/clojure.jdbc - A clojure.java.jdbc alternative. https://github.com/niwibe/suricatta - High level Sql toolkit (slightly higher level abstraction over plain jdbc and includes sql dsl) Cheers. Andrey 2015-02-24 15:11 GMT+01:00 Colin Yates colin.ya...@gmail.com: Actually, https://github.com/krisajenkins/yesql, now that it supports named parameters is probably just the ticket... On Tuesday, 24 February 2015 14:04:36 UTC, Colin Yates wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Andrey Antukh - Андрей Антух - andrei.anto...@kaleidos.net / n...@niwi.be http://www.niwi.be http://www.niwi.be/page/about/ https://github.com/niwibe -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Current best-of-breed JDBC libraries?
Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
Actually, https://github.com/krisajenkins/yesql, now that it supports named parameters is probably just the ticket... On Tuesday, 24 February 2015 14:04:36 UTC, Colin Yates wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
On Feb 24, 2015, at 6:04 AM, Colin Yates colin.ya...@gmail.com wrote: What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? At World Singles, all our MySQL interaction is done through clojure.java.jdbc (which I maintain), and HoneySQL for our more complex reporting queries. We like the composability of HoneySQL for complex stuff. We have a small wrapper around clojure.java.jdbc for basic CRUD stuff (get-by-id, delete-by-id, find-by-keys) that encapsulates the identifier/entity mappings and the DB connections we use, but we’re slowly moving away from that toward raw clojure.java.jdbc and leveraging the :row-fn and :result-set-fn keys more. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
I haven't used it but I remember building up pages of SQL in Clojure wasn't fun. The idea of putting that SQL into a .sql file, accessible by non-Clojure DB developer is very appealing. On 24 February 2015 at 18:24, Niels van Klaveren niels.vanklave...@gmail.com wrote: Perhaps I'm missing something, but I don't really see the advantages of yesql over standard parametrized clojure.java.jdbc queries ? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
OK - thanks all. I am surprised that yesql isn't more adopted, particularly now named parameters is there - has anyone run into roadblocks with it? On 24 February 2015 at 16:50, Sean Corfield s...@corfield.org wrote: On Feb 24, 2015, at 6:04 AM, Colin Yates colin.ya...@gmail.com wrote: What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? At World Singles, all our MySQL interaction is done through clojure.java.jdbc (which I maintain), and HoneySQL for our more complex reporting queries. We like the composability of HoneySQL for complex stuff. We have a small wrapper around clojure.java.jdbc for basic CRUD stuff (get-by-id, delete-by-id, find-by-keys) that encapsulates the identifier/entity mappings and the DB connections we use, but we’re slowly moving away from that toward raw clojure.java.jdbc and leveraging the :row-fn and :result-set-fn keys more. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
Perhaps I'm missing something, but I don't really see the advantages of yesql over standard parametrized clojure.java.jdbc queries ? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
On Feb 24, 2015, at 9:16 AM, Colin Yates colin.ya...@gmail.com wrote: I am surprised that yesql isn't more adopted, particularly now named parameters is there - has anyone run into roadblocks with it? Most of our SQL is dynamically created -- data-driven -- so YeSQL isn't really a good fit, as I understand it. We're either building SQL from a map of key/value pairs or from composable pieces using HoneySQL (for our complex reports that are all driven by data as well). Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
Honeysql has to be one of the best examples of data transformation where Clojure really shines. {domain-data} - {honey-sql data} - SQL. Love it. I understand YeSQL's sweet spot is where the SQL is static except for parameters so yeah, not applicable for building up queries at runtime. Still, if SQL is known up front then it seems very nice. On 24 February 2015 at 18:10, Sean Corfield s...@corfield.org wrote: On Feb 24, 2015, at 9:16 AM, Colin Yates colin.ya...@gmail.com wrote: I am surprised that yesql isn't more adopted, particularly now named parameters is there - has anyone run into roadblocks with it? Most of our SQL is dynamically created -- data-driven -- so YeSQL isn't really a good fit, as I understand it. We're either building SQL from a map of key/value pairs or from composable pieces using HoneySQL (for our complex reports that are all driven by data as well). Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
I ran through all of the above and found it easier just to build my queries straight and call with clojure.java.jdbc. But my needs were light. On Tue, Feb 24, 2015 at 10:40 AM, Colin Yates colin.ya...@gmail.com wrote: I haven't used it but I remember building up pages of SQL in Clojure wasn't fun. The idea of putting that SQL into a .sql file, accessible by non-Clojure DB developer is very appealing. On 24 February 2015 at 18:24, Niels van Klaveren niels.vanklave...@gmail.com wrote: Perhaps I'm missing something, but I don't really see the advantages of yesql over standard parametrized clojure.java.jdbc queries ? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Current best-of-breed JDBC libraries?
I actually prefer yesql for most of my Clojure-SQL interaction. Since a significant portion of my job involves me writing and optimizing SQL queries, I like being able to seamlessly switch between psql, org-babel's sql mode, and yesql with a simple cut and paste operation. For extra emacs sexiness, check out the yesql-ghosts package in MELPA. This automatically inserts all of the imported function signatures (as defns) as a text overlay below any (defqueries ...) form when a clojure buffer is in cider-mode. Keep on hackin' in the free world, ~Gary On Tuesday, February 24, 2015 at 9:04:36 AM UTC-5, Colin Yates wrote: Hi all, What are you all using for interacting with an RDBMS? In the past I looked at clojure.java.jdbc, honeysql and korma (and for querying, honeysql just rocks). I have lost touch a bit - any recommendations? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.