This is a really awesome library to generate typesafe sql queries right from the C++ source code. Example usage:<p><pre><code> auto res = db(select(foo.name, foo.hasFun)
.from(foo)
.where(foo.id > 17 and foo.name.like("%bar%")));
</code></pre>
If you're writing SQL queries in C++ code check it out!
Just a few months ago I realized that you can hack CoffeeScript's syntax to embed DSLs directly. I wrote up a quick little proof-of-concept for SQL [0], HTML [1], and CSS [2]. Obviously the HTML one is inspired by the React syntax.<p>I've always hated how easy it is to push SQL bugs into production, since it's so often just a string literal stuck in your code. AFAIC you don't really need the typing help, you just need to know that you didn't forget a damn comma somewhere.<p>[0]: <a href="https://github.com/couchand/just-sql" rel="nofollow">https://github.com/couchand/just-sql</a><p>[1]: <a href="https://github.com/couchand/just-html" rel="nofollow">https://github.com/couchand/just-html</a><p>[2]: <a href="https://github.com/couchand/just-css" rel="nofollow">https://github.com/couchand/just-css</a>