MySQL async SDK#156
Merged
Merged
Conversation
Contributor
Author
|
The CI failure is another stupid "block all PRs because someone is sad about some existing dependency" cargo audit thing. |
Collaborator
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Contributor
Author
|
BoxBodded |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Collaborator
|
Given #159 i think we should just do the mysql rename in this PR before we cut a v0.7. |
| #[cfg(feature = "mysql")] | ||
| #[cfg_attr(docsrs, doc(cfg(feature = "mysql")))] | ||
| // MySQL database access. | ||
| #[cfg(feature = "mysql-async")] |
Collaborator
There was a problem hiding this comment.
Suggested change
| #[cfg(feature = "mysql-async")] | |
| #[cfg(feature = "mysql")] |
| #[cfg_attr(docsrs, doc(cfg(feature = "mysql")))] | ||
| // MySQL database access. | ||
| #[cfg(feature = "mysql-async")] | ||
| #[cfg_attr(docsrs, doc(cfg(feature = "mysql-async")))] |
Collaborator
There was a problem hiding this comment.
Suggested change
| #[cfg_attr(docsrs, doc(cfg(feature = "mysql-async")))] | |
| #[cfg_attr(docsrs, doc(cfg(feature = "mysql")))] |
|
|
||
| [features] | ||
| default = ["http", "key-value", "json", "llm", "mqtt", "mysql", "pg", "postgres4-types", "redis", "sqlite", "variables", "export-sdk-language"] | ||
| default = ["http", "key-value", "json", "llm", "mqtt", "mysql", "mysql-async", "pg", "postgres4-types", "redis", "sqlite", "variables", "export-sdk-language"] |
Collaborator
There was a problem hiding this comment.
Suggested change
| default = ["http", "key-value", "json", "llm", "mqtt", "mysql", "mysql-async", "pg", "postgres4-types", "redis", "sqlite", "variables", "export-sdk-language"] | |
| default = ["http", "key-value", "json", "llm", "mqtt", "mysql", "pg", "postgres4-types", "redis", "sqlite", "variables", "export-sdk-language"] |
| llm = [] | ||
| mqtt = [] | ||
| mysql = [] | ||
| mysql-async = [] |
Collaborator
There was a problem hiding this comment.
Suggested change
| mysql-async = [] |
fibonacci1729
approved these changes
Jul 8, 2026
fibonacci1729
left a comment
Collaborator
There was a problem hiding this comment.
Just the feature tweaks but otherwise LGTM!
Contributor
Author
|
Faugh, sorry about that. MORE TEA |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That's the last time I let you trick me into anything "not very big" @fibonacci1729
The complexity is not in the main SDK, which is as per Postgres, but in the sample, which needed to return a variety of different body types. After wasting far too much time faffing around with
Box dyn, I copped out and cheated my way to success.I put the async stuff into a
mysql_asyncmodule. We could put it in themysqlmodule, but that would be a breaking change. At SDK 7, we can of course make that change: the user impact will be changing their module references. In the sample I did it asuse mysql_async::{self as mysql}which makes things look nicer and means I only have one line to delete when SDK 7 comes around.I tested the sample manually, and added some basic instructions on setting up MySQL because I was lost as.