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 have searched the existing issues and didn't find my feature already requested there
Feature description
Usecase
Due to historical reasons I have to deal with a codebase where we are converting Uuid's to string when we fetch them from database, as a result we need to look at the custom generator logic in particular the following functions
render_column_type
render_column_attribute
The current custom generator
Right now both these functions return str which is hard to make changes too. I was wondering if you would be open to modifying these interfaces to return some types here, so these types are easy to modify.
I will take the example of modifying these for the aforementioned use case. To satisfy the condition I have done the following
Which, imo, offers a far simpler interface for the consumer of this API to work with.
I have to admit that I have only thought about this from the use case that I encountered, and have not considered the overall impact on the generators. For that I can definitely use your insights, and lastly if this is something you would be interested in pursuing let me know, I can try to cook a PR to test out how this will look like.
Last but certainly not least, thanks for this awesome project it has been super useful.
Use case
Due to historical reasons I have to deal with a codebase where we are converting Uuid's to string when we fetch them from database, as a result we need to look at the custom generator logic in particular the following functions
render_column_type
render_column_attribute
Most of the details about this are already covered in the feature description section.
The text was updated successfully, but these errors were encountered:
Things to check first
Feature description
Usecase
Due to historical reasons I have to deal with a codebase where we are converting Uuid's to string when we fetch them from database, as a result we need to look at the custom generator logic in particular the following functions
render_column_type
render_column_attribute
The current custom generator
Right now both these functions return
str
which is hard to make changes too. I was wondering if you would be open to modifying these interfaces to return some types here, so these types are easy to modify.I will take the example of modifying these for the aforementioned use case. To satisfy the condition I have done the following
As you can see this is a lot of code for something extremely trivial.
Proposed feature (or rather modification)
Let's assume we had types like the following
And the methods on the generators had the following interface
The the code that a consumer of this API would have to write would have been something like
The Custom Generator with these proposed changes
Which, imo, offers a far simpler interface for the consumer of this API to work with.
I have to admit that I have only thought about this from the use case that I encountered, and have not considered the overall impact on the generators. For that I can definitely use your insights, and lastly if this is something you would be interested in pursuing let me know, I can try to cook a PR to test out how this will look like.
Last but certainly not least, thanks for this awesome project it has been super useful.
Use case
Due to historical reasons I have to deal with a codebase where we are converting Uuid's to string when we fetch them from database, as a result we need to look at the custom generator logic in particular the following functions
render_column_type
render_column_attribute
Most of the details about this are already covered in the feature description section.
The text was updated successfully, but these errors were encountered: