unit testing postgres, mysql. temporary workaround for backticks

This commit is contained in:
Brad Rydzewski
2015-10-20 00:08:09 -07:00
parent 2dd4d6613c
commit 7f9ef94f47
13 changed files with 43 additions and 82 deletions

View File

@@ -18,13 +18,16 @@ func Rebind(query string) string {
rqb := make([]byte, 0, len(qb)+5)
j := 1
for _, b := range qb {
if b == '?' {
switch b {
case '?':
rqb = append(rqb, '$')
for _, b := range strconv.Itoa(j) {
rqb = append(rqb, byte(b))
}
j++
} else {
case '`':
rqb = append(rqb, ' ')
default:
rqb = append(rqb, b)
}
}