This commit is contained in:
azw 2023-08-20 15:56:40 +08:00
parent d219aee28f
commit 9c1fba62cf

View File

@ -235,7 +235,20 @@ func (this *dbPool) joinWhere(sql *string, params *[]string, whereKv [][]string)
}
func (this *dbPool) joinUpdateFields(fieldsKv [][]string, params *[]string) string {
return ""
sql := ""
for index, items := range fieldsKv {
suffix := ""
if index + 1 < len(fieldsKv) {
suffix = ","
}
if items[0][0] == '!' {
sql += " `" + items[0][1:] + "`=" + items[1] + suffix
} else {
sql += " `" + items[0] + "`=?" + suffix
*params = append(*params, items[1])
}
}
return sql
}
func (this *dbPool) joinInsertFields(fieldsKv [][]string, params *[]string) string {