[MM-39232] Migrate from gorp to sqlx in store/sqlstore/reaction_store.go (#18657)
* [MM-39232] Migrate from gorp to sqlx in store/sqlstore/reaction_store.go * Fix failing mysql tests * Fix failing postgres specs * Use struct instead of params
Этот коммит содержится в:
@@ -132,3 +132,18 @@ func makeStringArgs(params []string) []interface{} {
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
func constructArrayArgs(ids []string) (string, []interface{}) {
|
||||
var placeholder strings.Builder
|
||||
values := make([]interface{}, 0, len(ids))
|
||||
for _, entry := range ids {
|
||||
if placeholder.Len() > 0 {
|
||||
placeholder.WriteString(",")
|
||||
}
|
||||
|
||||
placeholder.WriteString("?")
|
||||
values = append(values, entry)
|
||||
}
|
||||
|
||||
return "(" + placeholder.String() + ")", values
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user