improve logging content field name from selected/updated to rows

This commit is contained in:
John Guo
2021-10-25 19:50:52 +08:00
parent 4717e01708
commit f6c2206b88

View File

@ -626,9 +626,9 @@ func (c *Core) writeSqlToLogger(ctx context.Context, sql *Sql) {
)
switch sql.Type {
case sqlTypeQueryContext:
sqlTypeKey = `selected`
sqlTypeKey = `rows`
default:
sqlTypeKey = `affected`
sqlTypeKey = `rows`
}
if sql.IsTransaction {
if v := ctx.Value(transactionIdForLoggerCtx); v != nil {