summaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/builder/builder_insert.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-03-22 23:12:55 +0800
committerGitHub <noreply@github.com>2020-03-22 11:12:55 -0400
commitc61b902538e8e4b2bb83136f190e044a6bbcdd9b (patch)
treebc08142f5ced69721ab14793b8dc62aa83314268 /vendor/xorm.io/builder/builder_insert.go
parentdcaa5643d70cd1be72e53e82a30d2bc6e5f8de92 (diff)
downloadgitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.tar.gz
gitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.zip
Upgrade xorm to v1.0.0 (#10646)
* Upgrade xorm to v1.0.0 * small nit * Fix tests * Update xorm * Update xorm * fix go.sum * fix test * Fix bug when dump * Fix bug * update xorm to latest * Fix migration test * update xorm to latest * Fix import order * Use xorm tag
Diffstat (limited to 'vendor/xorm.io/builder/builder_insert.go')
-rw-r--r--vendor/xorm.io/builder/builder_insert.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/xorm.io/builder/builder_insert.go b/vendor/xorm.io/builder/builder_insert.go
index 9558a8acad..8cef5c56c6 100644
--- a/vendor/xorm.io/builder/builder_insert.go
+++ b/vendor/xorm.io/builder/builder_insert.go
@@ -58,6 +58,8 @@ func (b *Builder) insertWriteTo(w Writer) error {
if e, ok := value.(expr); ok {
fmt.Fprintf(valBuffer, "(%s)", e.sql)
args = append(args, e.args...)
+ } else if value == nil {
+ fmt.Fprintf(valBuffer, `null`)
} else {
fmt.Fprint(valBuffer, "?")
args = append(args, value)