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
// Oracle supports the IN operator for bulk operations
321
+
// Build the IN clause with bind variables
322
+
// Oracle uses :1, :2, etc. for bind variables in the IN clause
323
+
params:=make([]any, len(req))
324
+
bindVars:=make([]string, len(req))
325
+
fori, r:=rangereq {
326
+
ifr.Key=="" {
327
+
returnnil, errors.New("missing key in bulk get operation")
328
+
}
329
+
params[i] =r.Key
330
+
bindVars[i] =":"+strconv.Itoa(i+1)
331
+
}
332
+
333
+
inClause:=strings.Join(bindVars, ",")
334
+
// Concatenation is required for table name because sql.DB does not substitute parameters for table names.
335
+
//nolint:gosec
336
+
query:="SELECT key, value, binary_yn, etag, expiration_time FROM "+o.metadata.TableName+" WHERE key IN ("+inClause+") AND (expiration_time IS NULL OR expiration_time > systimestamp)"
0 commit comments