go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/mysqlproxy Index | Files

package mysqlproxy

import "gopkg.in/src-d/go-vitess.v1/vt/mysqlproxy"

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


Package Files


type Proxy Uses

type Proxy struct {
    // contains filtered or unexported fields

Proxy wraps the standalone query service

func NewProxy Uses

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

NewProxy creates a new proxy

func (*Proxy) Execute Uses

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 Uses

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

Rollback rolls back the session

type ProxySession Uses

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

ProxySession holds session state for the proxy

Package mysqlproxy imports 7 packages (graph) and is imported by 2 packages. Updated 2019-06-13. Refresh now. Tools for package owners.