Skip to content
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

Allow sql_package: "go-sql-driver/mysql" #2219

Merged
merged 1 commit into from
Apr 21, 2023
Merged

Conversation

Jille
Copy link
Contributor

@Jille Jille commented Apr 20, 2023

In preparation of #2179 for LOAD DATA LOCAL INFILE

@Jille
Copy link
Contributor Author

Jille commented Apr 20, 2023

I ran a basic test locally, but real tests will come with the next PRs for that issue.

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to add a new configuration option for this instead of re-using sql_package. The current value changes the package to use, either database/sql or pgx/v4 or pgxv5. In this case we're still using database/sql as a base, but using the mysql driver to do some additional work.

I think adding a new sql_driver override is the way to go and require it to be set to the full import path of github.com/go-sql-driver/mysql.

internal/codegen/golang/driver.go Outdated Show resolved Hide resolved
internal/codegen/golang/driver.go Outdated Show resolved Hide resolved
@Jille Jille force-pushed the loaddata1 branch 4 times, most recently from 378ecab to d6560ce Compare April 21, 2023 12:25
In preparation of sqlc-dev#2179 for LOAD DATA LOCAL INFILE
@Jille
Copy link
Contributor Author

Jille commented Apr 21, 2023

Done

@kyleconroy kyleconroy merged commit 0cc1aad into sqlc-dev:main Apr 21, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants