13 lines
235 B
Go
13 lines
235 B
Go
|
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, ",")
|
||
|
}
|