mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
Update contrib/drivers/mssql/mssql_do_insert.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -42,8 +42,13 @@ func (d *Driver) DoInsert(
|
||||
}
|
||||
foundPrimaryKey := false
|
||||
for _, primaryKey := range primaryKeys {
|
||||
if _, ok := list[0][primaryKey]; ok {
|
||||
foundPrimaryKey = true
|
||||
for dataKey := range list[0] {
|
||||
if strings.EqualFold(dataKey, primaryKey) {
|
||||
foundPrimaryKey = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if foundPrimaryKey {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user