90 Star 495 Fork 152

平凯星辰(北京)科技有限公司/tidb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
LICENSES
ast
ast.go
base.go
ddl.go
ddl_test.go
dml.go
dml_test.go
expressions.go
expressions_test.go
flag.go
flag_test.go
format_test.go
functions.go
functions_test.go
misc.go
misc_test.go
read_only_checker.go
read_only_checker_test.go
stats.go
cmd
config
ddl
distsql
docs
domain
executor
expression
hack
hooks
infoschema
kv
meta
metrics
model
mysql
owner
parser
perfschema
plan
privilege
server
session
sessionctx
statistics
store
structure
table
tablecodec
terror
tidb-server
types
util
vendor
x-server
.dockerignore
.editorconfig
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTORS
Dockerfile
Gopkg.lock
Gopkg.toml
Jenkinsfile
LICENSE
Makefile
README.md
checklist.md
checkout-pr-branch.sh
circle.yml
code_review_guide.md
errcheck_excludes.txt
gitcookie.sh
克隆/下载
base.go 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
// Copyright 2015 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package ast
import "github.com/pingcap/tidb/types"
// node is the struct implements node interface except for Accept method.
// Node implementations should embed it in.
type node struct {
text string
}
// SetText implements Node interface.
func (n *node) SetText(text string) {
n.text = text
}
// Text implements Node interface.
func (n *node) Text() string {
return n.text
}
// stmtNode implements StmtNode interface.
// Statement implementations should embed it in.
type stmtNode struct {
node
}
// statement implements StmtNode interface.
func (sn *stmtNode) statement() {}
// ddlNode implements DDLNode interface.
// DDL implementations should embed it in.
type ddlNode struct {
stmtNode
}
// ddlStatement implements DDLNode interface.
func (dn *ddlNode) ddlStatement() {}
// dmlNode is the struct implements DMLNode interface.
// DML implementations should embed it in.
type dmlNode struct {
stmtNode
}
// dmlStatement implements DMLNode interface.
func (dn *dmlNode) dmlStatement() {}
// exprNode is the struct implements Expression interface.
// Expression implementations should embed it in.
type exprNode struct {
node
types.Datum
Type types.FieldType
flag uint64
}
// SetDatum implements ExprNode interface.
func (en *exprNode) SetDatum(datum types.Datum) {
en.Datum = datum
}
// GetDatum implements ExprNode interface.
func (en *exprNode) GetDatum() *types.Datum {
return &en.Datum
}
// SetType implements ExprNode interface.
func (en *exprNode) SetType(tp *types.FieldType) {
en.Type = *tp
}
// GetType implements ExprNode interface.
func (en *exprNode) GetType() *types.FieldType {
return &en.Type
}
// SetFlag implements ExprNode interface.
func (en *exprNode) SetFlag(flag uint64) {
en.flag = flag
}
// GetFlag implements ExprNode interface.
func (en *exprNode) GetFlag() uint64 {
return en.flag
}
type funcNode struct {
exprNode
}
// functionExpression implements FunctionNode interface.
func (fn *funcNode) functionExpression() {}
type resultSetNode struct {
resultFields []*ResultField
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/pingcap/tidb.git
git@gitee.com:pingcap/tidb.git
pingcap
tidb
tidb
v2.0.5

搜索帮助