-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Haskell bindings + Nix build #117
Comments
Thanks! Happy to see you created Haskell bindings!
Hmm, good question - since the library is usually not used as a package (but rather embedded in the various language-specific wrappers), we don't have a place in this repo for packaging information. If there is no downside to it, I think for now I'd prefer not to have packaging-related files in this repo (but open to it, if it makes a difference for maintainability).
There isn't really - the source of truth is the Postgres source code, and the structure gets generated from that. One could potentially envision creating a JSON schema file for the AST if you auto-generated it, similar to how the Protobuf definitions get auto-generated (see https://github.com/pganalyze/libpg_query/blob/13-latest/scripts/generate_protobuf_and_funcs.rb - not the easiest to read file, but that does all the work based on the files located in the |
Hmm, my approach was to copy the AST from the PostgreSQL |
Not sure how you mean - the This JSON output logic is based on the automatic analysis of the Postgres source code, with the information saved to the If you were to translate them back to a language-specific structure, my recommendation would be to either:
Hope that helps! |
Hello 馃憢馃徏 thanks for making this library, its great work.
In the course of making Haskell bindings (pg-query), I've also created a nix build.
If you'd like I can submit a PR of this derivation to
nixpkgs
, this repo, or both (or neither).Also, is there a formal specification of the JSON structure of the SQL AST? I'd like to begin making a Haskell AST now that its accessible via C, but unsure if there's a spec somewhere (i.e. like a JSON schema file, etc.)
The text was updated successfully, but these errors were encountered: