Prevent SetProduct
from being used for a tuple
#3
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.
SetProduct
finally usesslick.jdbc.SetParameter.SetSimpleProduct
to set product elements.SetSimpleProduct
handles only a few primitive types, which are determined at run time. There is no room to makeSetSimpleProduct
to handle a user-defined type.In contrast, tuples are handled by
slick.jdbc.SetParameter.createTupleN
, in which case the element types of a tuple are subject to searching implicitSetParameter
s at compile time. This gives us a chance to inject our customSetParameter
implicits for element types of tuples.The problem was that
createSetProduct
had accidentally shadowed implicits ofcreateTupleN
. This pull request fixes the problem by excluding tuples from targets ofcreateSetProduct
.