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
log.Warningf("error getting rows affected from DML event query: %s. i'm going to assume that the DML affected a single row, but this may result in inaccurate statistics", err)
1242
-
rowsAffected=1
1250
+
// We batch together the DML queries into multi-statements to minimize network trips.
1251
+
// We have to use the raw driver connection to access the rows affected
1252
+
// for each statement in the multi-statement.
1253
+
execErr:=conn.Raw(func(driverConnany) error {
1254
+
ex:=driverConn.(driver.ExecerContext)
1255
+
nvc:=driverConn.(driver.NamedValueChecker)
1256
+
1257
+
multiArgs:=make([]driver.NamedValue, 0, nArgs)
1258
+
multiQueryBuilder:= strings.Builder{}
1259
+
for_, buildResult:=rangebuildResults {
1260
+
for_, arg:=rangebuildResult.args {
1261
+
nv:= driver.NamedValue{Value: driver.Value(arg)}
1262
+
nvc.CheckNamedValue(&nv)
1263
+
multiArgs=append(multiArgs, nv)
1243
1264
}
1244
-
// each DML is either a single insert (delta +1), update (delta +0) or delete (delta -1).
1245
-
// multiplying by the rows actually affected (either 0 or 1) will give an accurate row delta for this DML event
0 commit comments