golden

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySqlProxy

type MySqlProxy struct {
	// contains filtered or unexported fields
}

func NewMySqlProxyHandler

func NewMySqlProxyHandler(logger *logrus.Logger, connStr string) (MySqlProxy, error)

NewMySqlProxyHandler creates a new MySqlProxy.

func (MySqlProxy) ComInitDB

func (h MySqlProxy) ComInitDB(c *mysql.Conn, schemaName string) error

ComInitDB implements mysql.Handler.

func (MySqlProxy) ComMultiQuery

func (h MySqlProxy) ComMultiQuery(
	c *mysql.Conn,
	query string,
	callback func(*sqltypes.Result, bool) error,
) (string, error)

ComMultiQuery implements mysql.Handler.

func (MySqlProxy) ComPrepare

func (h MySqlProxy) ComPrepare(c *mysql.Conn, query string) ([]*querypb.Field, error)

ComPrepare implements mysql.Handler.

func (MySqlProxy) ComQuery

func (h MySqlProxy) ComQuery(
	c *mysql.Conn,
	query string,
	callback func(*sqltypes.Result, bool) error,
) error

ComQuery implements mysql.Handler.

func (MySqlProxy) ComResetConnection

func (h MySqlProxy) ComResetConnection(c *mysql.Conn)

ComResetConnection implements mysql.Handler.

func (MySqlProxy) ComStmtExecute

func (h MySqlProxy) ComStmtExecute(c *mysql.Conn, prepare *mysql.PrepareData, callback func(*sqltypes.Result) error) error

ComStmtExecute implements mysql.Handler.

func (MySqlProxy) ConnectionClosed

func (h MySqlProxy) ConnectionClosed(c *mysql.Conn)

ConnectionClosed implements mysql.Handler.

func (MySqlProxy) NewConnection

func (h MySqlProxy) NewConnection(c *mysql.Conn)

NewConnection implements mysql.Handler.

func (MySqlProxy) WarningCount

func (h MySqlProxy) WarningCount(c *mysql.Conn) uint16

WarningCount is called at the end of each query to obtain the value to be returned to the client in the EOF packet. Note that this will be called either in the context of the ComQuery resultsCB if the result does not contain any fields, or after the last ComQuery call completes.

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidatingHandler

func NewValidatingHandler(handler mysql.Handler, mySqlConn string, logger *logrus.Logger) (Validator, error)

NewValidatingHandler creates a new Validator wrapping a MySQL connection.

func (Validator) ComInitDB

func (v Validator) ComInitDB(c *mysql.Conn, schemaName string) error

func (Validator) ComMultiQuery

func (v Validator) ComMultiQuery(
	c *mysql.Conn,
	query string,
	callback func(*sqltypes.Result, bool) error,
) (string, error)

func (Validator) ComPrepare

func (v Validator) ComPrepare(c *mysql.Conn, query string) ([]*query.Field, error)

ComPrepare parses, partially analyzes, and caches a prepared statement's plan with the given [c.ConnectionID].

func (Validator) ComQuery

func (v Validator) ComQuery(
	c *mysql.Conn,
	query string,
	callback func(*sqltypes.Result, bool) error,
) error

ComQuery executes a SQL query on the SQLe engine.

func (Validator) ComResetConnection

func (v Validator) ComResetConnection(c *mysql.Conn)

func (Validator) ComStmtExecute

func (v Validator) ComStmtExecute(c *mysql.Conn, prepare *mysql.PrepareData, callback func(*sqltypes.Result) error) error

func (Validator) ConnectionClosed

func (v Validator) ConnectionClosed(c *mysql.Conn)

ConnectionClosed reports that a connection has been closed.

func (Validator) NewConnection

func (v Validator) NewConnection(c *mysql.Conn)

NewConnection reports that a new connection has been established.

func (Validator) WarningCount

func (v Validator) WarningCount(c *mysql.Conn) uint16

WarningCount is called at the end of each query to obtain the value to be returned to the client in the EOF packet. Note that this will be called either in the context of the ComQuery resultsCB if the result does not contain any fields, or after the last ComQuery call completes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL