@@ -14,18 +14,18 @@ type Hook interface {
14
14
15
15
type ConnHook interface {
16
16
BeforeExecContext (ctx context.Context , query string , args []driver.NamedValue ) (context.Context , error )
17
- AfterExecContext (ctx context.Context , query string , args []driver.NamedValue , err error ) (context.Context , error )
17
+ AfterExecContext (ctx context.Context , query string , args []driver.NamedValue , r driver. Result , err error ) (context.Context , driver. Result , error )
18
18
BeforeBeginTx (ctx context.Context , opts driver.TxOptions ) (context.Context , error )
19
- AfterBeginTx (ctx context.Context , opts driver.TxOptions , err error ) (context.Context , error )
19
+ AfterBeginTx (ctx context.Context , opts driver.TxOptions , dd driver. Tx , err error ) (context.Context , driver. Tx , error )
20
20
BeforeQueryContext (ctx context.Context , query string , args []driver.NamedValue ) (context.Context , error )
21
- AfterQueryContext (ctx context.Context , query string , args []driver.NamedValue , err error ) (context.Context , error )
21
+ AfterQueryContext (ctx context.Context , query string , args []driver.NamedValue , rows driver. Rows , err error ) (context.Context , driver. Rows , error )
22
22
BeforePrepareContext (ctx context.Context , query string ) (context.Context , error )
23
- AfterPrepareContext (ctx context.Context , query string , err error ) (context.Context , error )
23
+ AfterPrepareContext (ctx context.Context , query string , s driver. Stmt , err error ) (context.Context , driver. Stmt , error )
24
24
}
25
25
26
26
type ConnectorHook interface {
27
27
BeforeConnect (ctx context.Context ) (context.Context , error )
28
- AfterConnect (ctx context.Context , err error ) (context.Context , error )
28
+ AfterConnect (ctx context.Context , dc driver. Conn , err error ) (context.Context , driver. Conn , error )
29
29
}
30
30
31
31
type TxHook interface {
@@ -37,7 +37,7 @@ type TxHook interface {
37
37
38
38
type StmtHook interface {
39
39
BeforeStmtQueryContext (ctx context.Context , query string , args []driver.NamedValue ) (context.Context , error )
40
- AfterStmtQueryContext (ctx context.Context , query string , args []driver.NamedValue , err error ) (context.Context , error )
40
+ AfterStmtQueryContext (ctx context.Context , query string , args []driver.NamedValue , rows driver. Rows , err error ) (context.Context , driver. Rows , error )
41
41
BeforeStmtExecContext (ctx context.Context , query string , args []driver.NamedValue ) (context.Context , error )
42
- AfterStmtExecContext (ctx context.Context , query string , args []driver.NamedValue , err error ) (context.Context , error )
42
+ AfterStmtExecContext (ctx context.Context , query string , args []driver.NamedValue , r driver. Result , err error ) (context.Context , driver. Result , error )
43
43
}
0 commit comments