...
|
...
|
@@ -51,6 +51,8 @@ func (hook SqlGeneratePrintHook) BeforeQuery(c context.Context, q *pg.QueryEvent |
|
|
func (hook SqlGeneratePrintHook) AfterQuery(c context.Context, q *pg.QueryEvent) error {
|
|
|
data, err := q.FormattedQuery()
|
|
|
//fmt.Println(string(data))
|
|
|
log.Debug(string(data))
|
|
|
if len(string(data)) > 6 { //BEGIN COMMIT
|
|
|
log.Debug(string(data))
|
|
|
}
|
|
|
return err
|
|
|
} |
...
|
...
|
|