You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using qm.OrIn and passing in an empty array custom closing parentheses are being removed.
See this example code:
inIds1:= []interface{}{1, 2}
inIds2:= []interface{}{}
dao.Users(
qm.WhereIn("(id IN ?", inIds1...),
qm.OrIn("id in ?)", inIds2...),
).AllP(ctx, u.dbPool.MustGetConnection())
Resulting query (note the missing closing parenthesis after (1=0)):
SELECT`users`.*FROM`users`WHERE ((id IN (?,?)) OR (1=0) AND (`users`.`deleted_at` is null);
Expected query:
SELECT`users`.*FROM`users`WHERE ((id IN (?,?)) OR (1=0)) AND (`users`.`deleted_at` is null);
What version of SQLBoiler are you using (sqlboiler --version)?
SQLBoiler v4.14.2
What is your database and version (eg. Postgresql 10)
MariaDB 10.5.8
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
If this happened at runtime what code produced the issue? (if not applicable leave blank)
see above
What is the output of the command above with the -d flag added to it? (Provided you are comfortable sharing this, it contains a blueprint of your schema)
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Further information. What did you do, what did you expect?
The text was updated successfully, but these errors were encountered:
When using
qm.OrIn
and passing in an empty array custom closing parentheses are being removed.See this example code:
Resulting query (note the missing closing parenthesis after
(1=0)
):Expected query:
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v4.14.2
What is your database and version (eg. Postgresql 10)
MariaDB 10.5.8
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
If this happened at runtime what code produced the issue? (if not applicable leave blank)
see above
What is the output of the command above with the
-d
flag added to it? (Provided you are comfortable sharing this, it contains a blueprint of your schema)Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Further information. What did you do, what did you expect?
The text was updated successfully, but these errors were encountered: