90 Star 482 Fork 141

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

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
eval_type.go 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
coocood 提交于 2017-11-04 23:37 . util/types: change types path (#5007)
// Copyright 2017 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 types
// EvalType indicates the specified types that arguments and result of a built-in function should be.
type EvalType byte
const (
// ETInt represents type INT in evaluation.
ETInt EvalType = iota
// ETReal represents type REAL in evaluation.
ETReal
// ETDecimal represents type DECIMAL in evaluation.
ETDecimal
// ETString represents type STRING in evaluation.
ETString
// ETDatetime represents type DATETIME in evaluation.
ETDatetime
// ETTimestamp represents type TIMESTAMP in evaluation.
ETTimestamp
// ETDuration represents type DURATION in evaluation.
ETDuration
// ETJson represents type JSON in evaluation.
ETJson
)
// IsStringKind returns true for ETString, ETDatetime, ETTimestamp, ETDuration, ETJson EvalTypes.
func (et EvalType) IsStringKind() bool {
return et == ETString || et == ETDatetime ||
et == ETTimestamp || et == ETDuration || et == ETJson
}
Go
1
https://gitee.com/pingcap/tidb.git
git@gitee.com:pingcap/tidb.git
pingcap
tidb
tidb
v2.0.11

搜索帮助