What is it?
ClangQL is a proof-of-concept SQLite extension for querying C++ codebases that have been indexed using clangd.
How does it work?
It employs SQLite's virtual table system to act as an intermediary between SQLite and clangd's gRPC interface
How do I use it?
Once the module has been built, you can load it in the sqlite3 CLI via the usual
.load clangql.
Afterwards, you can connect to a codebase by instantiating the various virtual tables:
sqlite> CREATE VIRTUAL TABLE llvm_symbols USING clangql (symbols, clangd-index.llvm.org:5900);
sqlite> CREATE VIRTUAL TABLE llvm_base_of USING clangql (base_of, clangd-index.llvm.org:5900);