Compare commits

..

No commits in common. "master" and "v1.1.12" have entirely different histories.

1 changed files with 0 additions and 26 deletions

26
save.go
View File

@ -104,18 +104,6 @@ func SaveRow(ctx context.Context, db *db.DBC, dataItem meta.IMetaStruct) error {
sqlSmt = sqlSmt[0:200] sqlSmt = sqlSmt[0:200]
} }
span.SetAttributes(
attribute.Int("sql_param_amount", len(params)),
)
// Convert SQL request parameters to slice of strings.
paramStrs := convertInterfacesToStrings(ctx, params)
if len(paramStrs) > 0 {
span.SetAttributes(
attribute.StringSlice("sql_params", paramStrs),
)
}
resultErr := errors.Errorf("Can not execute SaveRow. Got error from updateBuilder.ExecContext. %s (%s)", err.Error(), sqlSmt) resultErr := errors.Errorf("Can not execute SaveRow. Got error from updateBuilder.ExecContext. %s (%s)", err.Error(), sqlSmt)
span.RecordError(resultErr) span.RecordError(resultErr)
span.SetStatus(codes.Error, resultErr.Error()) span.SetStatus(codes.Error, resultErr.Error())
@ -130,20 +118,6 @@ func SaveRow(ctx context.Context, db *db.DBC, dataItem meta.IMetaStruct) error {
return nil return nil
} }
func convertInterfacesToStrings(ctx context.Context, items []interface{}) []string {
itemAmount := len(items)
if itemAmount == 0 {
return nil
}
strs := make([]string, itemAmount)
for i, item := range items {
strs[i] = fmt.Sprint(item)
}
return strs
}
func SaveMetaRootStruct( func SaveMetaRootStruct(
ctx context.Context, ctx context.Context,
db *db.DBC, db *db.DBC,