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

Feature Request: A field-attribute macro to link a struct field with a database name #1195

Closed
EvanCarroll opened this issue Apr 29, 2021 · 1 comment

Comments

@EvanCarroll
Copy link

Serde provides field attributes that allow me to link the field names of a struct to JSON for the purposes of serialization and serialization. I would love the ability to this SQLx too,

Desired syntax,

struct Foo {
    #[sqlx(rename(column = "id_node"))]
    id: u64,
}
@EvanCarroll EvanCarroll changed the title A macro to link a struct field with a database name? A field-attribute macro to link a struct field with a database name? Apr 29, 2021
@EvanCarroll EvanCarroll changed the title A field-attribute macro to link a struct field with a database name? Feature Request: A field-attribute macro to link a struct field with a database name Apr 29, 2021
@EvanCarroll
Copy link
Author

This is done here #227

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

No branches or pull requests

1 participant