|
|
@ -405,10 +405,7 @@ func (this *TxQuery) UpdateAllStmt() error { |
|
|
|
if len(valSql) > 1 { |
|
|
|
setText = " value " |
|
|
|
} |
|
|
|
sql = helper.StringJoin("insert into ", dbName, " (", strings.Join(this.data, " , "), ")", setText, strings.Join(valSql, ",")) |
|
|
|
if len(this.value) == 0 { |
|
|
|
return errors.New("参数错误,条件值错误") |
|
|
|
} |
|
|
|
sql = helper.StringJoin("insert into ", dbName, " (", strings.Join(this.data, " , "), ")", setText, strings.Join(valSql, ","), " ON DUPLICATE KEY UPDATE ", strings.Join(updSql, " , ")) |
|
|
|
|
|
|
|
if this.debug { |
|
|
|
log.Println("insert on duplicate key update sql:", sql, this.value) |
|
|
|