Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
wen-templari committed Feb 15, 2024
1 parent 9fb8d2e commit ba71f76
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions repo/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package repo
import (
"context"
"database/sql"
"log"
"os"
"time"
"unsafe"

"github.com/go-sql-driver/mysql"
"github.com/nbtca/saturday/util"
Expand All @@ -30,9 +28,9 @@ func (h *Hooks) Before(ctx context.Context, query string, args ...interface{}) (
func (h *Hooks) After(ctx context.Context, query string, args ...interface{}) (context.Context, error) {
begin := ctx.Value("begin").(time.Time)
util.Logger.WithFields(logrus.Fields{
"query": query,
"args": args,
"elapsed": time.Since(begin),
"query": query,
"args": args,
"elapsed": time.Since(begin),
}).Debug("SQL executed")
return ctx, nil
}
Expand Down

0 comments on commit ba71f76

Please sign in to comment.