Skip to content

feature/derive db enum2#4988

Open
demhadais wants to merge 25 commits intodiesel-rs:mainfrom
demhadais:feature/derive-db-enum2
Open

feature/derive db enum2#4988
demhadais wants to merge 25 commits intodiesel-rs:mainfrom
demhadais:feature/derive-db-enum2

Conversation

@demhadais
Copy link
Copy Markdown

  • implement at least postgres deserialization and serialization of an enum type
  • basically complete the implementation
  • partial commit
  • turns out the function was done. just remove the unnecessary lines of code
  • rename the derive-macro to something a bit simpler. I'm not sure if this is good though. Also, write documentation. Also, write two simple tests
  • add a test that actually tries inserting the color into the database
  • remove failing test
  • give parsed_backends set explicit capacity
  • implement FromSql and ToSql for generated types, not Text
  • fix syntax for repeating elements
  • add as_expression and fromsqlrow impls
  • try to make the test work by using the derive correctly
  • fix test helper code
  • add sql_type to allowed parsing. I anticipate this will have to be reworked a bit
  • fix clippy and formatting recommendations
  • try to rely on the already implemented check-for-backend functionality to make it work
  • revert the rust tooclhain to fix the conflict
  • remove custom attribute and just use the model parsing because it's there
  • gate the enum test behind a feature to make it work

demhadais and others added 20 commits September 21, 2025 22:38
…his is good though. Also, write documentation. Also, write two simple tests
This is an incomplete pull request, but I am merging into my local fork to get updates from the upstream.
@demhadais demhadais marked this pull request as draft February 26, 2026 01:30
@demhadais demhadais marked this pull request as ready for review February 26, 2026 03:19
@demhadais
Copy link
Copy Markdown
Author

@weiznich Sorry this took so long, but just pinging you because I had a draft PR that I closed, and I haven't worked on this in a long time. Anyways, this implements the first step of #4759.

The tests are super basic, and I'm happy to add more, but I couldn't think of any meaningful tests that aren't redundant with other tests in the codebase.

Thanks!

@weiznich weiznich requested a review from a team March 22, 2026 19:08
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.

1 participant