mysqlfe

package
v0.0.0-...-a18f44e Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
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

func TableCreate

func TableCreate(tbl *schema.Table) (string, error)

Take a table and make create statement

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 (*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

func BuildMySqlJob(svr *models.ServerCtx, ctx *plan.Context) (*MySqlJob, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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