TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sqlpp11 – A type safe SQL template library for C++

28 pointsby paulkoerover 10 years ago

5 comments

paulkoerover 10 years ago
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 &gt; 17 and foo.name.like(&quot;%bar%&quot;))); </code></pre> If you&#x27;re writing SQL queries in C++ code check it out!
评论 #8751794 未加载
couchandover 10 years ago
Just a few months ago I realized that you can hack CoffeeScript&#x27;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&#x27;ve always hated how easy it is to push SQL bugs into production, since it&#x27;s so often just a string literal stuck in your code. AFAIC you don&#x27;t really need the typing help, you just need to know that you didn&#x27;t forget a damn comma somewhere.<p>[0]: <a href="https://github.com/couchand/just-sql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;couchand&#x2F;just-sql</a><p>[1]: <a href="https://github.com/couchand/just-html" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;couchand&#x2F;just-html</a><p>[2]: <a href="https://github.com/couchand/just-css" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;couchand&#x2F;just-css</a>
xtacyover 10 years ago
A similar library for Scala: <a href="http://squeryl.org/" rel="nofollow">http:&#x2F;&#x2F;squeryl.org&#x2F;</a>
ExpiredLinkover 10 years ago
What has SQL done to deserve this?
_ZeD_over 10 years ago
Is there a java equivalent?
评论 #8753162 未加载
评论 #8756883 未加载
评论 #8751835 未加载