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
I was able to workaround by making each documentId a separate parameter like so:
let arrayOfParameters: [Parameter] = documentIds.map { _ = $0; return Parameter() }
let selectCreationDates = Select(documents.creationDate, from: documents).where(documents.documentId.in( arrayOfParameters ))
// Notice that documentIds here is no longer wrapped in the parameters array
connection.execute(select, parameters: documentIds) { ...
This approach was a little counter-intuitive and seems less efficient.
This works as expected, but is vulnerable to sql injection attacks:
I've got an array of strings I'd like to use as a single parameter for for a
WHERE IN
clause.let documentIds: [String] = [....]
When I tried:
I got no result from the database.
I was able to workaround by making each documentId a separate parameter like so:
This approach was a little counter-intuitive and seems less efficient.
This works as expected, but is vulnerable to sql injection attacks:
The text was updated successfully, but these errors were encountered: