pingcap

package
v0.0.0-...-3db7e69 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* 2 * @Author: Nico 3 * @Date: 2019/9/7 19:03 4

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLRecognizer

type MySQLRecognizer struct {
	StmtNode   ast.StmtNode
	TableName  string
	TableAlias string
}

func NewMySQLRecognizer

func NewMySQLRecognizer(sql string) (*MySQLRecognizer, error)

func (*MySQLRecognizer) GetOriginalSQL

func (mr *MySQLRecognizer) GetOriginalSQL() (string, error)

func (*MySQLRecognizer) GetSQLType

func (*MySQLRecognizer) GetSQLType() (consts.SQLType, error)

func (*MySQLRecognizer) GetTableAlias

func (mr *MySQLRecognizer) GetTableAlias() (string, error)

func (*MySQLRecognizer) GetTableName

func (mr *MySQLRecognizer) GetTableName() (string, error)

type MySQLSelectForUpdateRecognizer

type MySQLSelectForUpdateRecognizer struct {
	MySQLWhereRecognizer
}

type MySQLWhereRecognizer

type MySQLWhereRecognizer struct {
	MySQLRecognizer
}

func (MySQLWhereRecognizer) GetWhereCondition

func (MySQLWhereRecognizer) GetWhereCondition() (string, error)

type TableVisitor

type TableVisitor struct {
	TableName  string
	TableAlias string
}

func GetTableVisitor

func GetTableVisitor() TableVisitor

func (*TableVisitor) Enter

func (tv *TableVisitor) Enter(inNode ast.Node) (outNode ast.Node, skipChildren bool)

func (*TableVisitor) Leave

func (tv *TableVisitor) Leave(inNode ast.Node) (node ast.Node, ok bool)

type WhereVisitor

type WhereVisitor struct {
	WhereCond string
}

func (*WhereVisitor) Enter

func (tv *WhereVisitor) Enter(inNode ast.Node) (outNode ast.Node, skipChildren bool)

func (*WhereVisitor) Leave

func (tv *WhereVisitor) Leave(inNode ast.Node) (node ast.Node, ok bool)

Jump to

Keyboard shortcuts

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