Skip to content

Commit

Permalink
add the default sql collector
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Aug 9, 2024
1 parent f8246ca commit b6127cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (is Interceptors) Intercept(sql string, args []any) (string, []any, error)
return sql, args, nil
}

// DefaultSqlCollector is the default sql collector.
var DefaultSqlCollector = NewSqlCollector()

// SqlCollector is used to collect the executed sqls.
type SqlCollector struct {
enabled atomic.Bool
Expand Down

0 comments on commit b6127cb

Please sign in to comment.