diff --git a/dbpool.go b/dbpool.go index 66a2d17..82b6e1a 100644 --- a/dbpool.go +++ b/dbpool.go @@ -206,7 +206,9 @@ func (this *dbPool) Upsert( return } if ds.Next() { - this.Update(dataSource, tblName, whereKv, updateKv, cb) + if len(updateKv) > 0 { + this.Update(dataSource, tblName, whereKv, updateKv, cb) + } } else { this.Insert(dataSource, tblName, insertKv, cb) }