Files
gocqlx/qb/qb.go

19 lines
290 B
Go
Raw Normal View History

2017-07-26 13:57:10 +02:00
package qb
import (
"bytes"
2017-07-26 13:57:10 +02:00
)
// placeholders returns a string with count ? placeholders joined with commas.
func placeholders(cql *bytes.Buffer, count int) {
2017-07-26 13:57:10 +02:00
if count < 1 {
return
2017-07-26 13:57:10 +02:00
}
for i := 0; i < count-1; i++ {
cql.WriteByte('?')
cql.WriteByte(',')
}
cql.WriteByte('?')
2017-07-26 13:57:10 +02:00
}