mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
19 lines
270 B
Go
19 lines
270 B
Go
package postgres
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func placeholder(n int) string {
|
|
return "$" + fmt.Sprint(n)
|
|
}
|
|
|
|
func placeholders(n int) string {
|
|
list := []string{}
|
|
for i := 0; i < n; i++ {
|
|
list = append(list, placeholder(i+1))
|
|
}
|
|
return strings.Join(list, ", ")
|
|
}
|