Add EntityClass#test(id) and support update { it[nullable] = nullable } #1277
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.
Sorry for 7 commits in a single PR, however, I expect they could just land to the main branch as is, and creating 7 different PR and rebasing them 6 times (after each gets merged) would be unnecessary overhead (for both of you and me).
Notes:
I adjusted generics in
UpdateBuilder
, so there's one type parameter and others are moved to function arguments. That makes exceptions slightly easier to read and understand.I would like to reorder
set
functions inUpdateBuilder
: first put 2 setters for regular column type, then 2 setters for EntityID column. However, I did not do that because it would make review/comparison harder. I can do that in a separate commit if you like.it[nullableRef] = null
does not compile now. I have no idea how to solve it as it can't decide betweennull as Int?
andnull as EntityID<Int>?
. The workaround is to usenull as EntityID<Int>?
. It might make sense to addUpdateBuilder#setNull(Column)
API so users could write:Fixes #1275, #1276, #1268