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 derives for Encode and Decode #71

Merged
merged 7 commits into from
Jan 24, 2020
Merged

add derives for Encode and Decode #71

merged 7 commits into from
Jan 24, 2020

Conversation

Freax13
Copy link
Contributor

@Freax13 Freax13 commented Jan 18, 2020

@Freax13 Freax13 requested a review from abonander January 18, 2020 12:32
@mehcode
Copy link
Member

mehcode commented Jan 20, 2020

This looks good to me. Perhaps we should test that the Encode and Decode of the inner T and the new unit struct produce equivalent results?

I'll let @abonander review the macro implementation when he gets in tomorrow.

Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

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

A handful of nits but the principal implementation looks solid to me as well.

Did the instructions I gave help or did you not really need them?

sqlx-macros/src/derives.rs Outdated Show resolved Hide resolved
sqlx-macros/src/derives.rs Outdated Show resolved Hide resolved
src/decode.rs Show resolved Hide resolved
src/encode.rs Show resolved Hide resolved
tests/derives.rs Outdated Show resolved Hide resolved
tests/derives.rs Outdated Show resolved Hide resolved
@Freax13
Copy link
Contributor Author

Freax13 commented Jan 24, 2020

Did the instructions I gave help or did you not really need them?

They certainly were very useful.

Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks so much.

@abonander abonander merged commit f0c88da into launchbadge:master Jan 24, 2020
@abonander
Copy link
Collaborator

@Freax13 if you're interested, we're discussing another derive that would build on this work in #76. (Since right now, these derives aren't directly useful themselves without HasSqlType.)

@Freax13
Copy link
Contributor Author

Freax13 commented Jan 24, 2020

adding derive for HasSqlType should be pretty easy

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