fix place holder for pgsql

This commit is contained in:
john
2020-07-20 22:47:12 +08:00
parent 207476be1f
commit ee5ddaab52

View File

@ -81,7 +81,7 @@ func Test_Func_FormatSqlWithArgs(t *testing.T) {
// pgsql
gtest.C(t, func(t *gtest.T) {
var s string
s = FormatSqlWithArgs("select * from table where id>=$v1 and sex=$v2", []interface{}{100, 1})
s = FormatSqlWithArgs("select * from table where id>=$1 and sex=$2", []interface{}{100, 1})
t.Assert(s, "select * from table where id>=100 and sex=1")
})
// oracle