Skip to content

Derive transparent#857

Merged
sfackler merged 1 commit intorust-postgres:masterfrom
malobre:feature/derive-transparent
Dec 30, 2021
Merged

Derive transparent#857
sfackler merged 1 commit intorust-postgres:masterfrom
malobre:feature/derive-transparent

Conversation

@malobre
Copy link
Contributor

@malobre malobre commented Dec 29, 2021

#[postgres(transparent)]

Acknowledgments

Example

#[derive(ToSql, FromSql)]
#[postgres(transparent)]
struct UserId(i32);

@sfackler
Copy link
Collaborator

Nice! Would also be good to have a few quick tests.

@malobre
Copy link
Contributor Author

malobre commented Dec 30, 2021

I added basic tests and updated some of the logic.

@malobre malobre marked this pull request as ready for review December 30, 2021 19:20
@sfackler
Copy link
Collaborator

Can you add a little bit of docs to the postgres-types crate?

LTGM otherwise!

@malobre
Copy link
Contributor Author

malobre commented Dec 30, 2021

I added documentation and squashed all the commits into one.
Edit: Had to squash again, I missed one of your comment.

@sfackler sfackler merged commit 774016d into rust-postgres:master Dec 30, 2021
@malobre malobre deleted the feature/derive-transparent branch December 30, 2021 23:10
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