[feat] 重命名 ConditionTokenType => TokenType

This commit is contained in:
2024-05-09 10:47:51 +08:00
parent dd56166a13
commit 9694d90332
3 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -12,14 +12,14 @@ import (
"github.com/spf13/cast"
)
type TokenType string
type ConditionOperator string
type ConditionTokenType string
const (
SQL ConditionTokenType = "sql"
FUNC ConditionTokenType = "func"
PARAM ConditionTokenType = "param"
STRING ConditionTokenType = "string"
SQL TokenType = "sql"
FUNC TokenType = "func"
PARAM TokenType = "param"
STRING TokenType = "string"
)
const (
@@ -54,7 +54,7 @@ type ConditionExpr struct {
fieldSqlFunc string
fieldSqlFuncParam string
ignoreEmptyParma bool
tokenType ConditionTokenType
tokenType TokenType
token string
matchPrefix string // 匹配前缀
}
@@ -147,7 +147,7 @@ func (this ConditionExpr) GetTokenName() string {
return this.token
}
func (this ConditionExpr) GetTokenType() ConditionTokenType {
func (this ConditionExpr) GetTokenType() TokenType {
return this.tokenType
}
@@ -247,7 +247,7 @@ func Operator(v ConditionOperator) ExprOption {
}
}
func Token(token string, tType ConditionTokenType) ExprOption {
func Token(token string, tType TokenType) ExprOption {
return func(option *ConditionExpr) {
option.token = token
option.tokenType = tType