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

add mysql2 package #178

Merged
merged 3 commits into from
Mar 28, 2024
Merged

add mysql2 package #178

merged 3 commits into from
Mar 28, 2024

Conversation

jamiehodge
Copy link
Contributor

@jamiehodge jamiehodge commented Mar 26, 2024

Add an additional mysql package based upon the node-mysql2 package, copying directly from the existing mariadb-based package. We have experienced issues with the mariadb pool implementation and would prefer to use node-mysql2. If the naming is awkward, we might consider adding suffixes to the implementation packages, ie mysql-mariadb and mysql-mysql2, or simply replacing the mariadb implementation.

The node-mysql2 promise-based connection API does not expose query streams, so we are forced to access the private, underlying connection instance.

I have successfully run the examples against a local mysql instance.

Copy link
Owner

@tim-smart tim-smart left a comment

Choose a reason for hiding this comment

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

Looks good thanks! Just one change and we can merge this.

@@ -0,0 +1,39 @@
{
"name": "@sqlfx/mysql2",
"version": "0.45.0",
Copy link
Owner

Choose a reason for hiding this comment

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

If you can set the version to 0.0.0, then run pnpm changeset and add a minor changeset for the initial version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that the changeset version is literally "minor". Did you mean 0.0.1 instead? Sorry, I've never used changesets before.

@jamiehodge jamiehodge marked this pull request as ready for review March 27, 2024 09:26
@jamiehodge
Copy link
Contributor Author

jamiehodge commented Mar 27, 2024

Thanks Tim. Assuming that you don't want to change any of the package naming or somehow extract common logic, I think this is good to go. I am sure that there exist administrative/introspection queries where the current response type/mapping don't hold, but I think that's the same for the existing mariadb adapter.

@tim-smart tim-smart merged commit 8df7ec5 into tim-smart:main Mar 28, 2024
2 checks passed
@github-actions github-actions bot mentioned this pull request Mar 28, 2024
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.

2 participants