MCPcopy Create free account
hub / github.com/apecloud/myduckserver / Handler

Interface Handler

pgserver/handler.go:27–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25)
26
27type 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}

Callers 19

handleBindMethod · 0.65
handleExecuteMethod · 0.65
handleParseMethod · 0.65
ComQueryMethod · 0.65
chooseInitialDatabaseMethod · 0.65
runMethod · 0.65
ConnectionClosedMethod · 0.65
HandleConnectionMethod · 0.65
RunAddColumnTestFunction · 0.65
RunModifyColumnTestFunction · 0.65
HandleConnectionMethod · 0.65
setPersisterFunction · 0.65

Implementers 1

DuckHandlerpgserver/duck_handler.go

Calls

no outgoing calls

Tested by

no test coverage detected