Git Query Language(amrdeveloper.github.io)
amrdeveloper.github.io
Git Query Language
https://amrdeveloper.github.io/GQL
4 comments
Isn't it's purpose merely to provide a way to query a git repo's commit history? It helps answer questions like "who has the most commits in the codebase?" and "what times of the day are commits most active?". I don't think it's meant to be anything more than that.
Exactly. They only have SQL query and a fixed set of tables. No insert, update or changing database structure.
https://blog.datomic.com/2012/10/codeq.html
>codeq ( 'co-deck') is a little application that imports your Git repositories into a Datomic database, then performs language-aware analysis on them, extending the Git model down from the file to the code quantum (codeq) level, and up across repos. By doing so, codeq allows you to:
>Track change at the program unit level (e.g. function and method definitions)
>Query your programs and libraries declaratively, with the same cognitive units and names you use while programming
>Query across repos
>codeq ( 'co-deck') is a little application that imports your Git repositories into a Datomic database, then performs language-aware analysis on them, extending the Git model down from the file to the code quantum (codeq) level, and up across repos. By doing so, codeq allows you to:
>Track change at the program unit level (e.g. function and method definitions)
>Query your programs and libraries declaratively, with the same cognitive units and names you use while programming
>Query across repos
I think why they did it is to provide a uniform way to access info in already present git repositories. Without it, people probably just come up with ad hoc shell scripts (which can get out of hand when what you're looking for becomes sufficiently complex).
This seems similar to this[1] Steampipe[2] plugin (except this plugin is only for GitHub repos).
[1] https://github.com/turbot/steampipe-plugin-github
[2] https://steampipe.io
[1] https://github.com/turbot/steampipe-plugin-github
[2] https://steampipe.io
The GitHub repo for this project was posted two months ago: https://news.ycombinator.com/item?id=38498688
I don't get this one:
SELECT DISTINCT title AS tt message FROM commits
Is there a comma missing after tt? Or is something fancy happening?
It doesn't look like this query language has much domain-specific syntax at all. It's just SQL with git as a storage backend.