Skip to content

Conversation

@ISibboI
Copy link
Contributor

@ISibboI ISibboI commented Oct 20, 2023

See #3836.

I would be happy to get some feedback about the implementation. I would write documentation if you are fine with the implementation as it is. I can also add more tests if needed.

@ISibboI ISibboI marked this pull request as ready for review October 20, 2023 10:43
@weiznich weiznich requested a review from a team October 20, 2023 11:26
Copy link

@p4r4d0xb0x p4r4d0xb0x left a comment

Choose a reason for hiding this comment

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

i think it can provide support enums to mysql !
souunds good
how about other reviewers..?

@p4r4d0xb0x p4r4d0xb0x requested a review from a team October 25, 2023 00:56
@Ten0
Copy link
Member

Ten0 commented Oct 25, 2023

i think it can provide support enums to mysql

Isn't there some form of support for this via https://crates.io/crates/diesel-derive-enum ?

Copy link
Member

@weiznich weiznich left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR 👍 The implementation itself looks fine for me and I'm open this feature.

The PR is currently missing:

  • Some more tests
  • Documentation for the new feature

Additionally I would like to keep the functionality for serialize and deserialize similar, that means we should add an

  • Implementation for AsChangeset to keep that attribute compatible there as well
  • A corresponding implementation for deserializing to keep the functionality somewhat symmetrical
"`#[diesel(embed)]` cannot be combined with `#[diesel(serialize_as)]`",
));
}
(None, Some(AttributeSpanWrapper { attribute_span, .. }), true) => {
Copy link
Member

Choose a reason for hiding this comment

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

We want to have a compile_fail test for this cases.

@pksunkara
Copy link
Member

pksunkara commented Mar 28, 2024

The code looks okay to me.

  • Need tests for AsChangeset logic
  • Need tests for deserialize_fn
  • Need to add the newly added attributes to UnknownAttribute error
  • Need UI tests for all the errors added in this PR
  • Need documentation for the new attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment