aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/xorm/statement_exprparam.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/xorm.io/xorm/statement_exprparam.go')
-rw-r--r--vendor/xorm.io/xorm/statement_exprparam.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/xorm.io/xorm/statement_exprparam.go b/vendor/xorm.io/xorm/statement_exprparam.go
index 4da4f1ea12..fc62e36f1f 100644
--- a/vendor/xorm.io/xorm/statement_exprparam.go
+++ b/vendor/xorm.io/xorm/statement_exprparam.go
@@ -69,10 +69,18 @@ func (exprs *exprParams) writeArgs(w *builder.BytesWriter) error {
if _, err := w.WriteString(")"); err != nil {
return err
}
- default:
+ case string:
+ if arg == "" {
+ arg = "''"
+ }
if _, err := w.WriteString(fmt.Sprintf("%v", arg)); err != nil {
return err
}
+ default:
+ if _, err := w.WriteString("?"); err != nil {
+ return err
+ }
+ w.Append(arg)
}
if i != len(exprs.args)-1 {
if _, err := w.WriteString(","); err != nil {