fusenapi/utils/placeholder/placeholder.go

13 lines
235 B
Go
Raw Normal View History

2023-06-09 12:06:24 +00:00
package sql_placeholder
import "strings"
// 获取对应长度占位符号
func GetSqlPlaceholder(l uint) string {
s := make([]string, 0, int(l))
for i := 0; i < int(l); i++ {
s = append(s, "?")
}
return strings.Join(s, ",")
}