Fix placeholder output

This commit is contained in:
Patrick O'brien 2016-08-13 17:57:13 +10:00
parent dd71e0907a
commit 19b4b722e7

View file

@ -206,9 +206,9 @@ func Placeholders(count int, start int, group int) string {
for i := 0; i < count; i++ {
if i != 0 {
if group > 1 && i%group == 0 {
buf.WriteString("), (")
buf.WriteString("),(")
} else {
buf.WriteString(", ")
buf.WriteByte(',')
}
}
buf.WriteString(fmt.Sprintf("$%d", start+i))