<story><title>Honey SQL – SQL as Clojure data structures</title><url>https://github.com/jkk/honeysql</url></story><parent_chain><item><author>christophilus</author><text>Curious to hear if anyone uses yesql or similar[1]. I&amp;#x27;d &lt;i&gt;really&lt;/i&gt; be interested in hearing from someone who has used Honey SQL and yesql and can compare&amp;#x2F;contrast.&lt;p&gt;After dealing with ActiveRecord for the past few years, I&amp;#x27;m ready to just be able to write plain old SQL again. It seems like yesql is a pretty sweet solution, but I haven&amp;#x27;t tried it in earnest.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;krisajenkins&amp;#x2F;yesql&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;krisajenkins&amp;#x2F;yesql&lt;/a&gt;</text></item></parent_chain><comment><author>ledgerdev</author><text>I&amp;#x27;ve found templated queries(e.g. yesql) are far preferable for complex selects&amp;#x2F;joins&amp;#x2F;subselects and just can&amp;#x27;t imagine using the data structure dsl for such queries. One huge downside of dsl queries is that they NEVER support the full sql syntax of any database, in my case postgres. The best part is being able to write the query in a sql editor then copy&amp;#x2F;paste directly, rather than needing to translate into a dsl.&lt;p&gt;On the other hand if you need dynamic queries, then yes dsl is more suited, as well as for other query types where the dsl can be much better at handling multiple records at once... like say inserting 10 rows at once.&lt;p&gt;So to sum up:&lt;p&gt;* complex select queries - templated queries really shine&lt;p&gt;* simple dynamic queries - templates for simple replacements&lt;p&gt;* complex dynamic queries - dsl&lt;p&gt;* inserts&amp;#x2F;updates&amp;#x2F;deletes - dsl&lt;p&gt;* portable sql - dsl</text></comment>
<story><title>Honey SQL – SQL as Clojure data structures</title><url>https://github.com/jkk/honeysql</url></story><parent_chain><item><author>christophilus</author><text>Curious to hear if anyone uses yesql or similar[1]. I&amp;#x27;d &lt;i&gt;really&lt;/i&gt; be interested in hearing from someone who has used Honey SQL and yesql and can compare&amp;#x2F;contrast.&lt;p&gt;After dealing with ActiveRecord for the past few years, I&amp;#x27;m ready to just be able to write plain old SQL again. It seems like yesql is a pretty sweet solution, but I haven&amp;#x27;t tried it in earnest.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;krisajenkins&amp;#x2F;yesql&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;krisajenkins&amp;#x2F;yesql&lt;/a&gt;</text></item></parent_chain><comment><author>joncampbelldev</author><text>I found yesql inadaquete for use with anything other than simple queries. Writing plain SQL is definitely nicer than an ORM, however, I find that manipulating SQL as data (honeysql) is far superior to .sql files with added magic (yesql).&lt;p&gt;As soon as I had to dynamically build queries (essential when moving beyond the complexity of &amp;quot;select this user record&amp;quot;) I ran into issues with yesql&amp;#x27;s lack of power.&lt;p&gt;It also fits closer to one of the main principles of clojure, to be data-driven&amp;#x2F;data-first&amp;#x2F;just-use-data etc etc</text></comment>