Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Apr 22, 2017
1 parent d0363db commit 4087649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (q *QL) SetDB(db model.SQLCommon) {

// BindVar return the placeholder for actual values in SQL statements, in many dbs it is "?", Postgres using $1
func (q QL) BindVar(i int) string {
return fmt.Sprintf("$%d", i)
return "$" + strconv.FormatInt(int64(i), 10)
}

// Quote quotes field name to avoid SQL parsing exceptions by using a reserved word as a field name
Expand Down

0 comments on commit 4087649

Please sign in to comment.