SQLInterpolation
could not work with QueryInterfaceRequest
#697
Labels
SQLInterpolation
could not work with QueryInterfaceRequest
#697
What did you do?
I wrote the query (with GRDB 4.8.0), to select the color value from inner joined table:
What did you expect to happen?
In the query above, there are two subqueries. I have
TaggedItem
andTagMeta
struct, which conforms to both ofPersistableRecord
andFetchableRecord
.So, it looks pretty to replace the subquery such as
TaggedItem.filter(Column("itemId") == itemId)
.But
SQLInterpolation
does not acceptQueryInterfaceRequest
(such asTaggedItem.filter(...)
), so I can not write the code such as:What happened instead?
Xcode shows the error: "Instance method 'appendInterpolation' requires that 'QueryInterfaceRequest' conform to 'SQLExpressible'".
I know, your document said there is no support for
QueryInterfaceRequest
.If there is more neat way to code, please let me know.
Thank you!
Environment
GRDB flavor(s): GRDB
GRDB version: 4.8.0
Installation method: CocoaPods
Xcode version: 11.2
Swift version: 5
Platform(s) running GRDB: iOS
macOS version running Xcode: 10.15.3
The text was updated successfully, but these errors were encountered: