2022-12-07 23:21:36 +01:00
|
|
|
package sq
|
|
|
|
|
2022-12-21 15:41:41 +01:00
|
|
|
import "context"
|
|
|
|
|
2022-12-07 23:21:36 +01:00
|
|
|
type Listener interface {
|
2022-12-21 15:41:41 +01:00
|
|
|
PrePing(ctx context.Context) error
|
|
|
|
PreTxBegin(ctx context.Context, txid uint16) error
|
2022-12-21 15:34:59 +01:00
|
|
|
PreTxCommit(txid uint16) error
|
|
|
|
PreTxRollback(txid uint16) error
|
2022-12-21 15:41:41 +01:00
|
|
|
PreQuery(ctx context.Context, txID *uint16, sql *string, params *PP) error
|
|
|
|
PreExec(ctx context.Context, txID *uint16, sql *string, params *PP) error
|
2022-12-21 15:34:59 +01:00
|
|
|
|
|
|
|
PostPing(result error)
|
|
|
|
PostTxBegin(txid uint16, result error)
|
|
|
|
PostTxCommit(txid uint16, result error)
|
|
|
|
PostTxRollback(txid uint16, result error)
|
|
|
|
PostQuery(txID *uint16, sqlOriginal string, sqlReal string, params PP)
|
|
|
|
PostExec(txID *uint16, sqlOriginal string, sqlReal string, params PP)
|
2022-12-07 23:21:36 +01:00
|
|
|
}
|