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
The query that should be the result: UPDATE table1 SET field = 'foo' WHERE id IN (SELECT id FROM table2 WHERE field IN (value1, value2))
Actual behavior
The compiler tells me that I will get the right request, but I keep getting an error.
Tell me how can I write a query to update a field with a nested query using quill?
Steps to reproduce the behavior
In quill it loks like:
val table1 = quote(querySchema[Table1]("table1"))
val table2 = quote(querySchema[Table2]("table2"))
val params = List("param1", "param2")
quote{
table1
.filter(t => table2.filter(t2 => liftQuery(params).contains(t2.field))
.map(_.id)
.contains(t.id)
)
.update(_.field -> lift("foo"))
}
Workaround
Not found
@getquill/maintainers
The text was updated successfully, but these errors were encountered:
Tell me how can I write a query to update a field with a nested query using quill?
Version: 3.19.0
Module: quill-jdbc-zio
Database: postgresql
Expected behavio
The query that should be the result:
UPDATE table1 SET field = 'foo' WHERE id IN (SELECT id FROM table2 WHERE field IN (value1, value2))
Actual behavior
The compiler tells me that I will get the right request, but I keep getting an error.
Tell me how can I write a query to update a field with a nested query using quill?
Steps to reproduce the behavior
In quill it loks like:
Workaround
Not found
@getquill/maintainers
The text was updated successfully, but these errors were encountered: