mysqlproxy

package
v2.2.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mysqlproxy is a basic module that proxies a mysql server session to appropriate calls in a queryservice back end, with optional query normalization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy wraps the standalone query service

func NewProxy

func NewProxy(target *querypb.Target, qs queryservice.QueryService, normalize bool) *Proxy

NewProxy creates a new proxy

func (*Proxy) Execute

func (mp *Proxy) Execute(ctx context.Context, session *ProxySession, sql string, bindVariables map[string]*querypb.BindVariable) (*ProxySession, *sqltypes.Result, error)

Execute runs the given sql query in the specified session

func (*Proxy) Rollback

func (mp *Proxy) Rollback(ctx context.Context, session *ProxySession) error

Rollback rolls back the session

type ProxySession

type ProxySession struct {
	TransactionID int64
	TargetString  string
	Options       *querypb.ExecuteOptions
	Autocommit    bool
}

ProxySession holds session state for the proxy

Jump to

Keyboard shortcuts

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