When using nim's SQL generator you need to add the `IN ()`-values manually,
since using the `?` will quote integer-values inside (`IN ('1','2','3')`).
The example below uses a safe range of IDs, but if you are going to use
external input for the IDs, then you need to validate the values manually
before using them in `join()` procedure.
import
std/db_postgres,
std/strutils
let
rangeOfIDs = 1..100
valueToSet = "test"
db = connectToDB()
var
allIDs: seq[int]
for i in rangeOfIDs:
allIDs.add(i)
db.exec(sql("UPDATE table SET column = ? WHERE id IN (" & allIDs.join(",")
& ")"), valueToSet)
Run