** Updates like **
dbClient.Debug().Model(&records).Updates(map[string]interface{}{}
results
version-1.9:
[54.05ms] UPDATE test_table SET category = 'fu', consumption = 1, description = 'this is update test 2', ops_engineer = 'menger' WHERE ops_consumptions.id = 1
version-1.22:
[96.632ms] [rows:1] UPDATE test_table SET category='yii',consumption=1,description='this is update test',ops_engineer='susu' WHERE id = 1
** Updates like **
version-1.22
dbClient.Debug().Exec()
results
version-1.22
[19.685ms] [rows:1] UPDATE test_table SET category = "fun1", consumption = 2, description = "this is update test 3", ops_engineer = "menger" WHERE test_table.id = 1
Your Question
** init ** version-1.9:dbClient, err := gorm.Open("mysql", dsn) version-1.22:dbClient, err := gorm.Open(mysql.Open(dsn), &gorm.Config{ DisableAutomaticPing: true, })
** Updates like ** dbClient.Debug().Model(&records).Updates(map[string]interface{}{}
results version-1.9: [54.05ms] UPDATE
test_table
SETcategory
= 'fu',consumption
= 1,description
= 'this is update test 2',ops_engineer
= 'menger' WHEREops_consumptions
.id
= 1version-1.22: [96.632ms] [rows:1] UPDATE test_table SET
category
='yii',consumption
=1,description
='this is update test',ops_engineer
='susu' WHEREid
= 1** Updates like ** version-1.22 dbClient.Debug().Exec()
results version-1.22 [19.685ms] [rows:1] UPDATE test_table SET category = "fun1", consumption = 2, description = "this is update test 3", ops_engineer = "menger" WHERE test_table.id = 1