GQL
GQL copied to clipboard
Add pgwire PostgreSQL wire protocol interface to CLI
Hello @AmrDeveloper this is a fantastic library, thanks for putting it together!
We have a need to query our Git repos using SQL but with a PosgreSQL wire protocol (so we can use it with psql or any other PostgreSQL client application).
If you're willing, we'd love to see you add a server mode in GQL using Rust pgwire crate. pgwire does all the hard work of setting up a PostgreSQL wire compatible server and can accept SQL through the wire and pass it into your GQL crates/code.
Something like this:
gql server --repo=NAME,/path/to/repo --repo=NAME2,/path/to/repo2 --port 5432
NAME,NAME2would be schema names (case insensitive)- /path/to/repo would be the repo names
The above would launch a server listening on port 5432 that would make gql pretend to be a PostgreSQL server. Then, any SQL sent to the GQL server through any PostgreSQL client would be sent to GQL and responses returned using PostgreSQL wire protocol.
We would be able to use NAME and NAME2 schema names to combine multiple repos' output.
Hello @shah,
That's sound very cool and can be used in many projects, thanks you so much for suggestion, My first plan is to start improving the core of GQL and then working on supporting for clients but i think it will be good to start checking PosgreSQL wire protocol and maybe start this module side by side with the core.
Thank you, Amr Hesham
GQL now has support for queering multi repositories :D
That's great news, @AmrDeveloper I appreciate the quick acceptance!
Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called repo in each table so that when you query multiple repos, we could use the repo column in our WHERE criteria.
Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called
repoin each table so that when you query multiple repos, we could use therepocolumn in ourWHEREcriteria.
Nice idea, i will implement it, Thanks for suggestion
Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called
repoin each table so that when you query multiple repos, we could use therepocolumn in ourWHEREcriteria.
Done, i implemented it now and will be released soon
@AmrDeveloper , hi there. Has this been released? I tried this now with the package, it throws an error, but it works when I compiled the code.
I will release it by the end of this week at most because i am working on big improvements in error handling, functions and performance
@shah « We have a need to query our Git repos using SQL but with a PosgreSQL wire protocol (so we can use it with psql or any other PostgreSQL client application). » Very neat idea ! With a postgreSQL wire, we could use some automatic SQL to graphQL tools like Hasura or plateformaticDB to provide a grapQL endpoint to query git repositories. It would be awesome !
GitQL 0.22.0 now has more features from postgreSQL and we can work on the write soon
Thank you