Gorm: 濡備綍鏌ョ湅gorm鍏蜂綋鎵ц鐨剆ql璇彞

Created on 24 Jul 2017  路  3Comments  路  Source: go-gorm/gorm

gorm鏈夌幇鎴愮殑鍑芥暟鏂规硶 鍙互鏂逛究鐨勬煡鐪媜rm瀵瑰簲鐨剆ql璇彞涔堬紵

    db.Model(&MainTask{}).Where("task_id in ?", task_ids).Update(MainTask{TaskStatus: task_status, UpdatedAt: time.Now()})

Most helpful comment

db.LogMode(true)

All 3 comments

Try the Debug.

// Debug a single operation, show detailed log for this operation
db.Debug().Where("name = ?", "jinzhu").First(&User{})

Logger Doc

@dinglixiang yes, thank U.

db.LogMode(true)

Was this page helpful?
0 / 5 - 0 ratings