feat: add transformer to ViewColumnOptions #8717
Merged
+122
−15
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.
Description of change
Resolves #4339
This pull request adds a
transformer
field toViewColumnOptions
, to allow a view column to be unmarshalled by a custom ValueTransformer. This is the same functionality that currently exists forColumnOptions
and regular table entities. Note that you can already get the same result as this PR using@ts-ignore
:However, it would be nice not to have to use
@ts-ignore
when needing this functionality.I updated some of the existing tests to verify that this works correctly. Also added some documentation on the view column options.
This seemed like a bit of low hanging fruit that I could do - let me know if there's something I missed!
Pull-Request Checklist
master
branchnpm run lint
passes with this changenpm run test
passes with this changeFixes #0000