qb: insert

This commit is contained in:
Michał Matczuk
2017-07-26 13:57:10 +02:00
parent 7b5d550b50
commit 5db5de8822
5 changed files with 214 additions and 3 deletions

14
qb/qb.go Normal file
View File

@@ -0,0 +1,14 @@
package qb
import (
"strings"
)
// placeholders returns a string with count ? placeholders joined with commas.
func placeholders(count int) string {
if count < 1 {
return ""
}
return strings.Repeat(",?", count)[1:]
}