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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Open-Source Query Builder

2 点作者 iFelix超过 1 年前
I&#x27;m looking for a frontend library that would take a database schema as input, and then provide a visual query builder like Metabase that supports filtering and aggregation. The output would be SQL that I would then send to the server to get data and render charts&#x2F;tables.<p>I&#x27;m surprised that this doesn&#x27;t exist as many SaaS want to provide self-serve analytics to their users.<p>I&#x27;ve found 2 react query builder libraries but they don&#x27;t support aggregation at all [1] [2].<p>Did I miss something? Any reason why this doesn&#x27;t exist? If we built this open-source, would you use it?<p>[1] https:&#x2F;&#x2F;github.com&#x2F;react-querybuilder&#x2F;react-querybuilder [2] https:&#x2F;&#x2F;github.com&#x2F;ukrbublik&#x2F;react-awesome-query-builder

1 comment

jakeboone02超过 1 年前
Maintainer of `react-querybuilder` here. Couple of things:<p>Firstly, both RQB and RAQB facilitate the `WHERE` clause of a query, not the `SELECT`, `FROM`, or other clauses that would control aggregation.<p>Secondly, I would strongly discourage you from passing SQL from the client to the server, even if you parameterize it. For RQB, we recommend passing the native query object as JSON to your API and using our provided export method on the server to transform it into SQL (or whatever format you need).<p>Once in a blue moon I get requests for aggregation support in RQB, so to address your last question: yes, I think there would be some demand for something like that.
评论 #39451384 未加载