proposal: improve handling positional parameters in WHERE
#777
Labels
breaking change
This feature / fix introduces breaking changes
f: sql
about SQL support
proposal
A suggestion for a change, feature, enhancement, etc
s: hold
This PR shouldn't be closed, but should wait for further work.
Milestone
Consider fixing the behavior of positional argument handling. supporting both variadic arguments and slice with values is very confusing and it can be confused to users. Possible directions (without deep consideration) are:
?
and number of arguments and allow slicesIN
to reduce complexity and easy usageRoughly, they look the same, but we need to see them in a logical context. The "removed section" basically do a similar job, but the target statement is totally different. In the SQL Builder, the function takes a whole generated SQL statement so the statement could have multiple
?
, so matching them with multiple arguments is not easy (a single value or slice per each?
could help this though). Previously we had a related issue [2] and PR [3] to fix it, and this change will bring that issue again.Yes, this could be a big breaking change since
.Where()
could be one of the most popular methods for users, and they mostly use it with variadic arguments. Also, if we change this way completely, there are more things to be fixed with it to make it works.Some references:
WHERE + IN
andHAVING
. #65Originally posted by @sio4 in #524 (comment)
The text was updated successfully, but these errors were encountered: