-
Notifications
You must be signed in to change notification settings - Fork 126
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
document enum support #261
Comments
Hi @kbilsted , seems interesting. I can't even say the behavior right now, TBH, this is not tested by me. I will find look how I can support this soon. This should be not be a big change on the compilers, but I need to write more test on this one before publishing. Will update this ticket about the progress moving forward. |
Hi @kbilsted , I am about to work on this feature. RepoDb supports type mapping like below. Existing features: Type level:
Property Level:
So on this enum support, I can simply do it like this. Type Level:
Property Level:
Question: With you as a possible user, how would you behave this enum if we are missing a mapping? Should we save it as String, or should we save it as Enum Underlying Type? I do not want to get influenced by outside discussions, so you might have already talked this one with somebody else. This question is targeted, and I would like to hear that. Thank you! |
Hi, thanks for asking. There are a number of dimensions you have to consider regular enums so fill out all the cells below and you have the answer ;)
|
This make sense and thanks. Anyway, I had covered the following on first check-in:
I also included the following.
For now, I have an initial check-in and here is the Integration Tests. The #8 corresponds to Ln 100 to Ln 117 -- that is currently commented. FYI: I have to write a few more tests for this to covered some more scenarios. But I will definitely issue a beta for you (to be able to test it). |
@kbilsted - a beta version has been introduced that includes this change. May I request for you to check it out and let me know about your feedback? Documentation: https://repodb.readthedocs.io/en/latest/pages/enumeration.html |
Great stuff! I don't see, however, the test cases cover half of the combinations of the matrix, e.g. where the top horizontal values are writing and the vertical values are reading. I'd focus more on getting the matrix right before rushing to code. |
Scenarios mentioned by your vertical and horizontal table is covered by the definitions below. But I need it to be tested well before I issue a new release build. The Integration Tests and Unit Tests are intact as per my expected behavior, but user behaviors are very important. Database Table:
Class Properties:
And with this Enum-level mapping:
This class is being used on the Integration Tests provided above. The only behaviors to be considered are:
|
The feature is now implemented at this library at version 1.9.8. |
Closing this ticket now. Thanks! |
Your project looks nice. Currently I'm using Dapper which Im sure you know.
One of the pain points of dapper is the lack of support for enums as documented here DapperLib/Dapper#813 DapperLib/Dapper#259
DapperLib/Dapper#458
DapperLib/Dapper#433
How is the support for enums in repodb? I've searched the documentation with little luck
The text was updated successfully, but these errors were encountered: