Documentation ¶
Index ¶
- Constants
- func ConnectionId(ctx expr.EvalContext) (value.IntValue, bool)
- func CurrentUser(ctx expr.EvalContext) (value.StringValue, bool)
- func DatabaseName(ctx expr.EvalContext) (value.StringValue, bool)
- func LoadMySqlFunctions()
- func MysqlTypeWriter(ctx expr.EvalContext, val value.Value) (value.StringValue, bool)
- func NewEmptyResultset(pp *plan.Projection) *mysql.Resultset
- func NewMySqlGlobalVars() *datasource.ContextSimple
- func NewMySqlSessionVars(db, user string, connId uint32) expr.ContextReadWriter
- func TableCreate(tbl *schema.Table) (string, error)
- type MySqlConnCreator
- type MySqlExecResultWriter
- type MySqlJob
- type MySqlResultWriter
Constants ¶
const (
// Default Max Allowed packets for connections
MaxAllowedPacket = 4194304
)
Variables ¶
This section is empty.
Functions ¶
func ConnectionId ¶
func ConnectionId(ctx expr.EvalContext) (value.IntValue, bool)
ConnectionId: id of current connection
connection_id() => 11, true
func CurrentUser ¶
func CurrentUser(ctx expr.EvalContext) (value.StringValue, bool)
CurrentUser: username of current user
current_user() => user, true
func DatabaseName ¶
func DatabaseName(ctx expr.EvalContext) (value.StringValue, bool)
DatabaseName: name of the database
DATABASE() => "your_db", true
func LoadMySqlFunctions ¶
func LoadMySqlFunctions()
func MysqlTypeWriter ¶
func MysqlTypeWriter(ctx expr.EvalContext, val value.Value) (value.StringValue, bool)
MysqlTypeWriter Convert a qlbridge value type to a mysql type
func NewEmptyResultset ¶
func NewEmptyResultset(pp *plan.Projection) *mysql.Resultset
func NewMySqlGlobalVars ¶
func NewMySqlGlobalVars() *datasource.ContextSimple
func NewMySqlSessionVars ¶
func NewMySqlSessionVars(db, user string, connId uint32) expr.ContextReadWriter
Types ¶
type MySqlConnCreator ¶
type MySqlConnCreator struct {
// contains filtered or unexported fields
}
MySql connection handler, a single connection session
not threadsafe, not shared
func (*MySqlConnCreator) Close ¶
func (m *MySqlConnCreator) Close() error
func (*MySqlConnCreator) Init ¶
func (m *MySqlConnCreator) Init(conf *models.ListenerConfig, svr *models.ServerCtx) error
func (*MySqlConnCreator) Open ¶
func (m *MySqlConnCreator) Open(connI interface{}) models.StatementHandler
Open handler is a per-client/conn copy of handler - this occurs once when a new tcp-conn is established - it re-uses the HandlerShard with has schema, etc on it
func (*MySqlConnCreator) Run ¶
func (m *MySqlConnCreator) Run(stop chan bool) error
type MySqlExecResultWriter ¶
type MySqlExecResultWriter struct { *exec.TaskBase Rs *mysql.Result // contains filtered or unexported fields }
func NewMySqlExecResultWriter ¶
func NewMySqlExecResultWriter(writer models.ResultWriter, ctx *plan.Context) *MySqlExecResultWriter
func (*MySqlExecResultWriter) Close ¶
func (m *MySqlExecResultWriter) Close() error
func (*MySqlExecResultWriter) Finalize ¶
func (m *MySqlExecResultWriter) Finalize() error
func (*MySqlExecResultWriter) ResultWriter ¶
func (m *MySqlExecResultWriter) ResultWriter() exec.MessageHandler
type MySqlJob ¶
type MySqlJob struct {
*planner.ExecutorGrid
}
Mysql job that wraps the dataux distributed planner with a dialect specific one
func BuildMySqlJob ¶
Create a MySql job that wraps underlying distributed planner, and qlbridge generic implementation
allowing per-method (VisitShow etc) to be replaced by a dialect specific handler.
- mysql `SHOW CREATE TABLE name` for example is dialect specific so needs to be replaced - also wraps a distributed planner from dataux
type MySqlResultWriter ¶
type MySqlResultWriter struct { *exec.TaskBase Rs *mysql.Resultset // contains filtered or unexported fields }
func NewMySqlResultWriter ¶
func NewMySqlResultWriter(writer models.ResultWriter, ctx *plan.Context) *MySqlResultWriter
func NewMySqlSchemaWriter ¶
func NewMySqlSchemaWriter(writer models.ResultWriter, ctx *plan.Context) *MySqlResultWriter
func (*MySqlResultWriter) Close ¶
func (m *MySqlResultWriter) Close() error
func (*MySqlResultWriter) Finalize ¶
func (m *MySqlResultWriter) Finalize() error
func (*MySqlResultWriter) Run ¶
func (m *MySqlResultWriter) Run() error
func (*MySqlResultWriter) WriteHeaders ¶
func (m *MySqlResultWriter) WriteHeaders() error