Files
gocqlx/qb/utils.go
Michał Matczuk 546e11d58f qb: select
2017-07-28 12:10:50 +02:00

19 lines
290 B
Go

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