Naive query rewriting. This is just a temporary solution and should be replaced with a more robust implementation.
( ctx context.Context, c *mysql.Conn, query string, callback mysql.ResultSpoolFn, )
| 68 | func auditResultCallback(audit *QueryAudit, callback mysql.ResultSpoolFn, modifiers ...ResultModifier) mysql.ResultSpoolFn { |
| 69 | return wrapResultCallback(func(res *sqltypes.Result, more bool) error { |
| 70 | if err := callback(res, more); err != nil { |
| 71 | return err |
| 72 | } |
| 73 | audit.AddRows(len(res.Rows)) |
| 74 | return nil |
| 75 | }, modifiers...) |
| 76 | } |
| 77 | |
| 78 | func (h *MyHandler) ComMultiQuery( |
| 79 | ctx context.Context, |
| 80 | c *mysql.Conn, |
| 81 | query string, |
| 82 | callback mysql.ResultSpoolFn, |
| 83 | ) (rest string, returnErr error) { |
nothing calls this directly
no test coverage detected