Skip to content

Conversation

asteurer
Copy link

@asteurer asteurer commented Aug 4, 2025

This is almost finished; however, I could use some help figuring out how to implement the driver.NamedValueChecker method on the stmt struct. The comments on the interface indicate that it's supposed to help the driver handle types beyond the default Value types; however, I'm not clear on which additional types need to be converted?

closes #30

@asteurer asteurer force-pushed the wasip2-mysql branch 2 times, most recently from ce5d716 to cd669eb Compare August 10, 2025 01:54
@asteurer asteurer changed the title feat: adding mysql feat(mysql): implementing mysql in wasip2 Aug 10, 2025
@asteurer
Copy link
Author

asteurer commented Aug 10, 2025

I decided to just leave out the driver.NamedValueChecker for now. Not quite sure why the example won't build, though.

@itowlson
Copy link
Contributor

itowlson commented Aug 11, 2025

Is it possible it's an interface version issue? Should it be fermyon:spin/[email protected]? The pre-versioning interface is in the WITs, but I'm not sure if it gets pulled into the package. (Guessing though.)

Comparison: MySQL (error) vs MQTT (works I believe): extra v2.0.0 in import path:

image

@asteurer asteurer force-pushed the wasip2-mysql branch 2 times, most recently from 5263d31 to d3176ee Compare August 11, 2025 21:35
@asteurer
Copy link
Author

@itowlson That did the trick! Thank you. This is ready for review. Please note that the example has been updated to include use of the db.Exec method.

Copy link
Contributor

@adamreese adamreese left a comment

Choose a reason for hiding this comment

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

Looking great! Can you add a package doc string like you did for redis?

Copy link
Contributor

@adamreese adamreese left a comment

Choose a reason for hiding this comment

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

Thanks Andrew!

@adamreese adamreese merged commit a52a86a into spinframework:wasip2 Aug 28, 2025
2 checks passed
@asteurer asteurer deleted the wasip2-mysql branch August 28, 2025 12:51
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.

3 participants