Versions in this module Expand all Collapse all v1 v1.0.0 Oct 16, 2017 Changes in this version + var ErrParse = terror.ClassParser.New(codeErrParse, mysql.MySQLErrName[mysql.ErrParse]) + var ErrSyntax = terror.ClassParser.New(codeErrSyntax, mysql.MySQLErrName[mysql.ErrSyntax]) + var SpecFieldPattern = regexp.MustCompile(`(\/\*!(M?[0-9]{5,6})?|\*\/)`) + func ParseErrorWith(errstr string, lineno int) *terror.Error + func TrimComment(txt string) string + type Parser struct + func New() *Parser + func (parser *Parser) Parse(sql, charset, collation string) ([]ast.StmtNode, error) + func (parser *Parser) ParseOneStmt(sql, charset, collation string) (ast.StmtNode, error) + func (parser *Parser) SetSQLMode(mode mysql.SQLMode) + type Pos struct + Col int + Line int + Offset int + type Scanner struct + func NewScanner(s string) *Scanner + func (s *Scanner) Errorf(format string, a ...interface{}) + func (s *Scanner) Errors() []error + func (s *Scanner) Lex(v *yySymType) int + func (s *Scanner) SetSQLMode(mode mysql.SQLMode)