Documentation ¶
Index ¶
- func EvalTypeToString(t types.EvalType) string
- type Context
- func (db *Context) Compile(sql string) (*executor.ExecStmt, error)
- func (db *Context) CompileStmtNode(stmt ast.StmtNode) (*executor.ExecStmt, error)
- func (db *Context) CurrentDB() string
- func (db *Context) Execute(sql string) error
- func (db *Context) ExecuteOne(sql string) (server.ResultSet, error)
- func (db *Context) ExecuteOneStmt(stmt ast.StmtNode) (server.ResultSet, error)
- func (db *Context) ExecuteWithTransform(sql string, transform StmtTransform) error
- func (db *Context) MayCreateDB(dbName string) error
- func (db *Context) Parse(sql string) ([]ast.StmtNode, error)
- func (db *Context) ParseOne(sql string) (ast.StmtNode, error)
- func (db *Context) RestoreSQL(node ast.Node) (string, error)
- func (db *Context) UseDB(dbName string) error
- type Instance
- type StmtTransform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalTypeToString ¶
Types ¶
type Context ¶
type Context struct { *Instance // contains filtered or unexported fields }
func (*Context) CompileStmtNode ¶
Compile `stmt` AST into physical plan
func (*Context) ExecuteOneStmt ¶
func (*Context) ExecuteWithTransform ¶
func (db *Context) ExecuteWithTransform(sql string, transform StmtTransform) error
Parse all statements in `sql`, `transform` them, then execute them
func (*Context) MayCreateDB ¶
func (*Context) RestoreSQL ¶
Restore AST to sql string, with some customizations
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func NewInstance ¶
Create a new `TiDBDriver` as `Instance` with mock store
func (*Instance) OpenContext ¶
Open a new `Context` for executing or compiling statements
Click to show internal directories.
Click to hide internal directories.