Repository navigation
feat: Accept plain strings for every enum-valued option. - #153
Merged
DanCardin merged 3 commits intoOct 28, 2026
Merged
Conversation
Enum-valued options such as volatility='stable' were documented as accepted but failed when rendered, so every postgresql and mysql option now coerces strings in __post_init__. This also adds with_volatility and with_parallel to the postgresql Function.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 89.93% 90.26% +0.33%
==========================================
Files 86 86
Lines 4151 4179 +28
Branches 861 861
==========================================
+ Hits 3733 3772 +39
+ Misses 338 329 -9
+ Partials 80 78 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DanCardin
approved these changes
Oct 28, 2026
Owner
|
A drawback of using |
Owner
|
with that said, 1. i'm not too worried about it and 2. it could probably be made more efficient (or at least not to unnecessarily perform the assignment) without breaking anything if it turns out to be a problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've rebased all of the Enums for the functions and triggers on
FromStringsand added__post_init__to normalise them back to their enum values.I decided to do the from_string conversion in
__post_init__so bad definitions fail at import instead of only coming up when being compared against the db.Also added the missing
with_volatilityandwith_parallelmethods to the Postgres Function class.