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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: ClangQL – Query C++ codebases using SQLite

73 点作者 frabert将近 4 年前

6 条评论

pkhuong将近 4 年前
For something less PoCy, <a href="https:&#x2F;&#x2F;www.sourcetrail.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.sourcetrail.com&#x2F;</a> &#x27;s internal representation of the reference graph is a sqlite db file with pretty much a triple store schema.
评论 #27249245 未加载
thechao将近 4 年前
Man. I love SQLite, but the current virtual table extension is a performance dumpster fire. SQLite doesn’t understand multiple-column indexes on virtual tables, and the secret sauce to make it pick the “best” index is found only in the Necronimicon. Inevitably, with even fairly trivial joins, SQLite bails out to a polynomial sequential scan.
评论 #27250364 未加载
gaze将近 4 年前
I tried doing this using prolog last summer to extract some features from a codebase. I loved it. Being able to query a codebase like a database is extremely useful.
marco_craveiro将近 4 年前
Pretty cool! One question though: if this was based on LSP in general, it could be generalised to any language, right? I wonder why they wired it to clangd specifically.
评论 #27253580 未加载
cryptonector将近 4 年前
Cscope as a SQL DB? I would really like that. But it&#x27;s important not to stop at parsed code, especially in C (for obvious reasons).
laymonage将近 4 年前
This is cool! You can do a lot of things with SQLite these days.