[feat] 重命名 ConditionTokenValue => TokenValue
This commit is contained in:
+5
-5
@@ -41,7 +41,7 @@ const (
|
||||
|
||||
type ExprOption func(option *ConditionExpr)
|
||||
|
||||
type ConditionTokenValue interface {
|
||||
type TokenValue interface {
|
||||
GetParam(k string) req.GlobalParams
|
||||
GetGlobalParamsUser() req.User
|
||||
}
|
||||
@@ -80,7 +80,7 @@ func (this *ConditionExpr) AppendTo(c *Condition) {
|
||||
this.parent = c
|
||||
}
|
||||
|
||||
func (this ConditionExpr) ToSql(m ConditionTokenValue) db.Expression {
|
||||
func (this ConditionExpr) ToSql(m TokenValue) db.Expression {
|
||||
first := "`" + this.fieldResource + "`.`" + this.field + "`"
|
||||
|
||||
if strings.Contains(this.field, "->") {
|
||||
@@ -151,7 +151,7 @@ func (this ConditionExpr) GetTokenType() ConditionTokenType {
|
||||
return this.tokenType
|
||||
}
|
||||
|
||||
func (this *ConditionExpr) GetTokenSqlValue(m ConditionTokenValue) string {
|
||||
func (this *ConditionExpr) GetTokenSqlValue(m TokenValue) string {
|
||||
if this.GetTokenType() == SQL {
|
||||
return this.token
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func (this *ConditionExpr) GetTokenSqlValue(m ConditionTokenValue) string {
|
||||
}
|
||||
}
|
||||
|
||||
func (this ConditionExpr) GetTokenValue(m ConditionTokenValue) any {
|
||||
func (this ConditionExpr) GetTokenValue(m TokenValue) any {
|
||||
switch this.GetTokenType() {
|
||||
case PARAM:
|
||||
if this.matchPrefix != "" {
|
||||
@@ -216,7 +216,7 @@ func (this ConditionExpr) GetTokenValue(m ConditionTokenValue) any {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this ConditionExpr) IsIgnoreEmptyParma(m ConditionTokenValue) bool {
|
||||
func (this ConditionExpr) IsIgnoreEmptyParma(m TokenValue) bool {
|
||||
if !this.ignoreEmptyParma {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user