| 25 | ) |
| 26 | |
| 27 | type Handler interface { |
| 28 | // ComBind is called when a connection receives a request to bind a prepared statement to a set of values. |
| 29 | ComBind(ctx context.Context, c *mysql.Conn, prepared PreparedStatementData, bindVars []any) ([]pgproto3.FieldDescription, error) |
| 30 | // ComExecuteBound is called when a connection receives a request to execute a prepared statement that has already bound to a set of values. |
| 31 | ComExecuteBound(ctx context.Context, conn *mysql.Conn, portal PortalData, callback func(*Result) error) error |
| 32 | // ComPrepareParsed is called when a connection receives a prepared statement query that has already been parsed. |
| 33 | ComPrepareParsed(ctx context.Context, c *mysql.Conn, query string, parsed tree.Statement) (*duckdb.Stmt, []uint32, []pgproto3.FieldDescription, error) |
| 34 | // ComQuery is called when a connection receives a query. Note the contents of the query slice may change |
| 35 | // after the first call to callback. So the DoltgresHandler should not hang on to the byte slice. |
| 36 | ComQuery(ctx context.Context, c *mysql.Conn, query string, auditQuery string, parsed tree.Statement, callback func(*Result) error) error |
| 37 | // ComResetConnection resets the connection's session, clearing out any cached prepared statements, locks, user and |
| 38 | // session variables. The currently selected database is preserved. |
| 39 | ComResetConnection(c *mysql.Conn) error |
| 40 | // ConnectionClosed reports that a connection has been closed. |
| 41 | ConnectionClosed(c *mysql.Conn) |
| 42 | // NewConnection reports that a new connection has been established. |
| 43 | NewConnection(c *mysql.Conn) |
| 44 | // NewContext creates a new sql.Context instance for the connection |c|. The |
| 45 | // optional |query| can be specified to populate the sql.Context's query field. |
| 46 | NewContext(ctx context.Context, c *mysql.Conn, query string) (*sql.Context, error) |
| 47 | } |
no outgoing calls
no test coverage detected