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.

Sqlc: Data access simplified. Throw away your ORM

24 pointsby kaashmonee6 months ago

4 comments

topicseed6 months ago
A great option for Go projects where you aren&#x27;t exploring your queries as changing and regenerating is cumbersome.<p>Also, SQLC doesn&#x27;t allow for dynamic query building so think about an input search struct from which you may add where clauses — or not.<p>Also doesn&#x27;t support multiple inserts with N rows being inserted.<p>Otherwise for standard queries, it&#x27;s great.
bvrmn6 months ago
Static templates for SQL becomes a chore to express dynamic queries. A dynamic query depends from incoming request. For example search filters should add or delete conditional expressions for a query.<p>I have a little research[1] on dynamic queries.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;baverman&#x2F;sqlbind?tab=readme-ov-file#dynamic-queries">https:&#x2F;&#x2F;github.com&#x2F;baverman&#x2F;sqlbind?tab=readme-ov-file#dynam...</a>
评论 #42316303 未加载
bvrmn6 months ago
Numbered parameters become fragile quite fast for even simple queries. Basically you couldn&#x27;t safely use query until carefully revising a template. A template change could potentially break existing queries. It&#x27;s kinda scary.<p>If library supports named parameters they should be used by default in examples.
评论 #42375371 未加载
jasfi6 months ago
This is cool, but most ORMs have support for raw SQL.
评论 #42316311 未加载
评论 #42316071 未加载