Skip to content

Generate list of functions supported by a vanilla MySQL instance #657

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kyleconroy opened this issue Aug 6, 2020 · 3 comments · Fixed by #796
Closed

Generate list of functions supported by a vanilla MySQL instance #657

kyleconroy opened this issue Aug 6, 2020 · 3 comments · Fixed by #796

Comments

@kyleconroy
Copy link
Collaborator

I laid the ground work for this in #550, but it needs significant work. For PostgreSQL, we need to do the following:

  • Refactor portions of sqlc-pg-gen into a separate package
  • Currently only function definitions are extracted. We need to include table and type information

MySQL is a bigger question mark because I don't know how to pull out the necessary information. The first step will be to explore what queries are necessary to get the needed data.

@eberkund
Copy link

eberkund commented Aug 7, 2020

Hey, I am just browsing to see if there is anything within my capabilities and commitment level that I could contribute.

My understanding is that the purpose of importing from a running instance is to basically map all the functions/types to Go types? Then using that mapping information the compiler can substitute for the Go types whenever it sees the functions/types used in SQL? Is this correct?

Awesome project by the way! I have only used it for a hello world project so far, but the paradigm looks refreshingly simple to work in. 👍

@kyleconroy kyleconroy changed the title Import a catalog from a running database Generate list of functions supported by a vanilla MySQL instance Oct 26, 2020
@kyleconroy
Copy link
Collaborator Author

Replaces #630 #725 #655

@kyleconroy
Copy link
Collaborator Author

This is sadly going to be more difficult than I thought. The information schema tables in MySQL do not contain built-in functions and procedures. This means we're going to have to construct that list manually, or via some type of scraping / codegen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants