1
This commit is contained in:
parent
b1c82ecb4f
commit
7ebe70aba4
@ -184,8 +184,8 @@ func (this *dbPool) OrmSelectOne(
|
|||||||
func (this *dbPool) Update(
|
func (this *dbPool) Update(
|
||||||
dataSource string,
|
dataSource string,
|
||||||
tblName string,
|
tblName string,
|
||||||
fieldsKv [][]string,
|
|
||||||
whereKv [][]string,
|
whereKv [][]string,
|
||||||
|
fieldsKv [][]string,
|
||||||
cb ExecResultCb) {
|
cb ExecResultCb) {
|
||||||
params := []string{}
|
params := []string{}
|
||||||
sql := "UPDATE `" + tblName + "` SET " + this.joinUpdateFields(fieldsKv, ¶ms) +
|
sql := "UPDATE `" + tblName + "` SET " + this.joinUpdateFields(fieldsKv, ¶ms) +
|
||||||
@ -228,7 +228,7 @@ func (this *dbPool) Upsert(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ds.Next() {
|
if ds.Next() {
|
||||||
this.Update(dataSource, tblName, updateKv, whereKv, cb)
|
this.Update(dataSource, tblName, whereKv, updateKv, cb)
|
||||||
} else {
|
} else {
|
||||||
this.Insert(dataSource, tblName, insertKv, cb)
|
this.Insert(dataSource, tblName, insertKv, cb)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user