GQL
GQL copied to clipboard
EOF/script input, default repo, and plain-text output
Very cool project. Three features I could see being immediately useful:
- EOF support for piped input; currently
echo SELECT 1 | gitql -r .goes into a loop redisplaying its prompt forever.echo 'SELECT 1\nexit' | gitql -r .works - script file support;
echo SELECT 1 >foo.sql; gitql -r . foo.sqlwould be useful. - default repo:
echo SELECT 1\\nexit | gitqlshould probably look for the repo in . (and possibly walk up .. until it finds a .git or hits /). - plain-text, csv, or json output:
gitql -r . foo.sql --csvwould be very useful in pipelines to work with the resultant data without the ascii tables.
I may work on some PRs for some of these as time permits (assuming they're not against some philosophy of the project). This is a very cool idea, and these would address a wider range of use cases.
Hello @jhheider,
Thank you for your suggestion all of them are very good for the project, we just need to order them and check requirements for example we need to revamp the CLI args parser and remove clap so we can easy add git files for current path as default value.
I will do small research and found requirements then create feature request issue for each point so you, me or anyone else can pick one and work on it
Thank you, Amr Hesham
No problem! I know people like to ask for stuff, so hopefully you find these suggestions useful as customer-discovery, if nothing else. :)
They are very useful, i will mention you once i created issues with full description
Hello @jhheider, I have implemented two feature request
- [x] EOF support for piped input;
echo 'SELECT CURRENT_DATE()' | ./gitql.exe -r ../..
- [x] gitql should probably look for the repo in .
echo 'SELECT 1' | gitql
TODO
- Script file support
- Plain-text, csv, or json output
These changes look amazing. Thanks for diving into them!
Thanks for suggestions, enjoy more is coming :D
- [x] Output as
JSONorCSV