Closed JaydenElliott closed 1 year ago
Can you also update the documentation here? https://github.com/sfackler/rust-postgres/blob/master/postgres-types/src/lib.rs
LGTM otherwise
Can you also update the documentation here? https://github.com/sfackler/rust-postgres/blob/master/postgres-types/src/lib.rs
LGTM otherwise
@sfackler Documentation added, see f4b181a20180f1853351be53a32865b6209d0ab4
can this be approved + merged @sfackler ?
we waiting for u, @sfackler
Thanks! Sorry for the delay
Related issue: #934
Adding a
rename_all
attribute to a struct or enum will rename the container's fields/variants according to the rule specified. Similar to serde'srename_all
but for use withToSql
andFromSql
.This removes the need to manually rename each field/variant before inserting/selecting from postgres (especially useful with enums, who's naming standards differ from rust).
Supported rules:
No external dependencies introduced. Case conversion code from serde was used.
Thanks @jakubadamw for the test cases from #952