TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: TypeScript SQL Query API Engine for Postgres

1 点作者 ardsh8 个月前
Some time ago I started working on this query API engine, a sort of layer on top of slonik[1], to abstract the most tedious parts of using straight SQL (dynamic filtering, paginating etc).<p>The idea was to make it easy to create typesafe querying APIs, similar to ORMs I was using at the time, but using pure SQL. I was also inspired by hasura&#x27;s GraphQL API engine, but wanted to build something simpler for tRPC APIs, thus the name.<p>I&#x27;ve also built a small playground where you can see the raw SQL queries that are created when you run the API [2]<p>It&#x27;s a proof of concept that I&#x27;ve used to build APIs with a lot of dynamic filters and complex sub-queries, I&#x27;d love to know your thoughts on it!<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;gajus&#x2F;slonik">https:&#x2F;&#x2F;github.com&#x2F;gajus&#x2F;slonik</a><p>[2]: <a href="https:&#x2F;&#x2F;sql-api-playground.netlify.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sql-api-playground.netlify.app&#x2F;</a>

1 comment

firxworx8 个月前
This is genius... very awesome.<p>sql-api-engine would be an insanely powerful tool for business apps, I really hope you keep working at this!<p>I really appreciate slonik for e2e data integrity across the stack backed by zod at every step. It has many advantages over other tools in the ecosystem.<p>I&#x27;d love to see your PoC examples. Poking around the sql-api-engine codebase there&#x27;s much to appreciate and respect. Great work!