You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just switched from sqlx to cornucopia and want to love it, but it doesn't seem to allow any control over serialization without basically wrapping and rewriting code for all structs.
It just serializes timestamp with/without time zone into an array. And serde does not allow changing it without overriding each and every single field.
Cornucopia only generates the following for structs: #[derive(serde::Serialize, Debug, Clone, PartialEq)]
But it does not seem to allow annotating fields with #[serialize(with = "...") etc. without changing the generated cornucopia.rs file, which gets deleted and re-recreated every time.
How then can I serialize/deserialize proper date time formats into standards such as ISO-8601 which the rest of the world is using?
Might as well use the CLI, generate the structs, then have to update them manually every time the database is altered?
The text was updated successfully, but these errors were encountered:
I just switched from sqlx to cornucopia and want to love it, but it doesn't seem to allow any control over serialization without basically wrapping and rewriting code for all structs.
It just serializes timestamp with/without time zone into an array. And serde does not allow changing it without overriding each and every single field.
Cornucopia only generates the following for structs:
#[derive(serde::Serialize, Debug, Clone, PartialEq)]
But it does not seem to allow annotating fields with
#[serialize(with = "...")
etc. without changing the generated cornucopia.rs file, which gets deleted and re-recreated every time.How then can I serialize/deserialize proper date time formats into standards such as ISO-8601 which the rest of the world is using?
Might as well use the CLI, generate the structs, then have to update them manually every time the database is altered?
The text was updated successfully, but these errors were encountered: