upper / db

Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
https://upper.io/
MIT License
3.54k stars 235 forks source link

argument not replaced when inside subquery #671

Open rafaelvanoni opened 2 years ago

rafaelvanoni commented 2 years ago

I have a query in this form

SELECT ...
FROM  ...
JOIN (SELECT ...
          FROM ...
          WHERE ... IN ? )
....

I've tried running it with Query(argSlice) or even with a prepared statement but the ? is never replaced with the contents of argSlice. I also tried bulding subqueries with chained methods with no success.

Is there a better way of doing this?

Thanks