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

mysql: Add JSON support #251

Merged
merged 2 commits into from
Apr 19, 2020
Merged

Conversation

blackwolf12333
Copy link
Contributor

@blackwolf12333 blackwolf12333 commented Apr 14, 2020

Fixes #143

@blackwolf12333 blackwolf12333 force-pushed the mysql_json branch 2 times, most recently from 9f287d2 to d7b1228 Compare April 14, 2020 16:26
@@ -291,12 +291,14 @@ checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
name = "cargo-sqlx"
version = "0.1.0"
dependencies = [
"anyhow",
Copy link
Contributor Author

@blackwolf12333 blackwolf12333 Apr 14, 2020

Choose a reason for hiding this comment

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

Not entirely sure why this is here, I just rebased on upstream master. Let me know if this should be removed.

@blackwolf12333 blackwolf12333 force-pushed the mysql_json branch 2 times, most recently from 2b493e5 to 0f408d6 Compare April 18, 2020 12:04
Since the implementation of Encode and Decode for both mysql and
postgres on serde's Value and RawValue were practically the same they
were moved to the generic json module.
@mehcode mehcode merged commit 1b04829 into launchbadge:master Apr 19, 2020
@mehcode
Copy link
Member

mehcode commented Apr 19, 2020

@blackwolf12333

Check out 1cdfb85

&T still implements Serialize so this works. It may be a bit voodoo as it uses a lesser used Rust feature "higher-ranked trait bounds" so we can have a local lifetime in the normal T: Trait syntax.

@mehcode
Copy link
Member

mehcode commented Apr 19, 2020

Regardless, great job pushing this through. 👍

@blackwolf12333
Copy link
Contributor Author

Oh that's great that you could get rid of the clone!

@blackwolf12333 blackwolf12333 deleted the mysql_json branch April 20, 2020 14:36
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.

Support native JSON for MySQL 8+ and JsonString
2 participants