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
There does not appear to be a (convenient) way to execute a query with an array of values. For example, I want to run a query like:
SELECT key, createDate, lastAccessDate, value FROM cache WHERE key IN ("111", "222", "333"...
Placing a ? inside the parens and passing the array as an extra argument to query seems to yield an error.
I've worked around this with code like the following:
letkeyString= keys.map({"\"\($0)\""}).joined(separator:", ")letsql="SELECT key, createDate, lastAccessDate, value FROM cache WHERE key IN (\(keyString))"letitems:[Item]=try connection.query(sql)
Is there a better way of doing this that is not documented? Would it be possible to add this capability to SQift?
The text was updated successfully, but these errors were encountered:
There does not appear to be a (convenient) way to execute a query with an array of values. For example, I want to run a query like:
SELECT key, createDate, lastAccessDate, value FROM cache WHERE key IN ("111", "222", "333"
...Placing a
?
inside the parens and passing the array as an extra argument toquery
seems to yield an error.I've worked around this with code like the following:
Is there a better way of doing this that is not documented? Would it be possible to add this capability to SQift?
The text was updated successfully, but these errors were encountered: