parser

package
v0.0.0-...-887f819 Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSyntaxErr terror.ErrCode = 1
)

Error codes.

Variables

View Source
var (
	ErrSyntax = terror.ClassParser.New(CodeSyntaxErr, "syntax error")
)

Error instances.

Functions

func Parse

func Parse(sql, charset, collation string) ([]ast.StmtNode, error)

Parse parses a query string to raw ast.StmtNode. If charset or collation is "", default charset and collation will be used.

func ParseOneStmt

func ParseOneStmt(sql, charset, collation string) (ast.StmtNode, error)

ParseOneStmt parses a query and returns an ast.StmtNode. The query must have one statement, otherwise ErrSyntax is returned.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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