20 lines
655 B
Go
20 lines
655 B
Go
package sq
|
|
|
|
import "context"
|
|
|
|
type Listener interface {
|
|
PrePing(ctx context.Context) error
|
|
PreTxBegin(ctx context.Context, txid uint16) error
|
|
PreTxCommit(txid uint16) error
|
|
PreTxRollback(txid uint16) error
|
|
PreQuery(ctx context.Context, txID *uint16, sql *string, params *PP) error
|
|
PreExec(ctx context.Context, txID *uint16, sql *string, params *PP) error
|
|
|
|
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)
|
|
}
|