[feat] 命名更新

This commit is contained in:
what 2023-07-20 15:04:07 +08:00
parent 9e1a2c4e24
commit 9683179bf8
2 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ func (this ConditionExpr) IsIgnoreEmptyParma(m contracts.ModelParam) bool {
return false
}
func NewExpr(rResource, rField, token string, operator contracts.ConditionOperator, tType contracts.ConditionTokenType, ignoreEmptyParma bool, fn, fnParam string) contracts.ConditionExpr {
func NewConditionExpr(rResource, rField, token string, operator contracts.ConditionOperator, tType contracts.ConditionTokenType, ignoreEmptyParma bool, fn, fnParam string) contracts.ConditionExpr {
return &ConditionExpr{
operator: operator,
field: rField,

View File

@ -26,7 +26,7 @@ func TestEngine(t *testing.T) {
cond1 := condition.New(contracts.ConditionType_AND, "条件1")
cond1.SetExpr(condition.NewExpr(
cond1.SetExpr(condition.NewConditionExpr(
"TestTable", "age", "age",
contracts.ConditionOperator_EQ, contracts.ConditionTokenType_PARAM,
false, "", "",
@ -65,7 +65,7 @@ func TestRelationEngine(t *testing.T) {
}
cond1 := condition.New(contracts.ConditionType_AND, "条件1").
SetExpr(condition.NewExpr(
SetExpr(condition.NewConditionExpr(
"TestTable", "age", "age",
contracts.ConditionOperator_EQ, contracts.ConditionTokenType_PARAM,
false, "", "",
@ -77,12 +77,12 @@ func TestRelationEngine(t *testing.T) {
})
cond2 := condition.New(contracts.ConditionType_OR, "条件2").
SetExpr(condition.NewExpr(
SetExpr(condition.NewConditionExpr(
"TestTableA", "age", "age",
contracts.ConditionOperator_EQ, contracts.ConditionTokenType_PARAM,
false, "", "",
)).
SetExpr(condition.NewExpr(
SetExpr(condition.NewConditionExpr(
"TestTable", "age", "age",
contracts.ConditionOperator_EQ, contracts.ConditionTokenType_PARAM,
false, "", "",