[HN Gopher] Show HN: ClangQL - Query C++ codebases using SQLite
       ___________________________________________________________________
        
       Show HN: ClangQL - Query C++ codebases using SQLite
        
       Author : frabert
       Score  : 42 points
       Date   : 2021-05-22 18:15 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | cryptonector wrote:
       | Cscope as a SQL DB? I would really like that. But it's important
       | not to stop at parsed code, especially in C (for obvious
       | reasons).
        
       | pkhuong wrote:
       | For something less PoCy, https://www.sourcetrail.com/ 's internal
       | representation of the reference graph is a sqlite db file with
       | pretty much a triple store schema.
        
         | frabert wrote:
         | The idea for doing this experiment was actually that I tried
         | times and times again to produce a SourceTrail graph for the
         | LLVM codebase but always failed due to one reason or another.
         | Then I discovered that they provided the gRPC interface to
         | their clangd index and I came up with this.
         | 
         | EDIT: also, doing things this way you don't need to reimplement
         | C++ indexing because you can leverage the existing clang
         | features
        
       | thechao wrote:
       | 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.
        
         | frabert wrote:
         | I'd be very interested in this SQLite Necronomicon you're
         | talking about :)
        
       ___________________________________________________________________
       (page generated 2021-05-22 23:00 UTC)