[feat] 调整 接口文件
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.fsdpf.net/go/condition"
|
||||
"git.fsdpf.net/go/condition/contracts"
|
||||
"git.fsdpf.net/go/req"
|
||||
)
|
||||
|
||||
@@ -24,11 +23,11 @@ func TestEngine(t *testing.T) {
|
||||
g: req.NewGlobalParam(`{"age": 30}`, nil),
|
||||
}
|
||||
|
||||
cond1 := condition.New(contracts.AND, "条件1")
|
||||
cond1 := condition.New(condition.AND, "条件1")
|
||||
|
||||
cond1.SetExpr(condition.NewExpr(
|
||||
"TestTable", "age", "age",
|
||||
contracts.EQ, contracts.PARAM,
|
||||
condition.EQ, condition.PARAM,
|
||||
false, "", "",
|
||||
))
|
||||
|
||||
@@ -67,10 +66,10 @@ func TestRelationEngine(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
cond1 := condition.New(contracts.AND, "条件1").
|
||||
cond1 := condition.New(condition.AND, "条件1").
|
||||
SetExpr(condition.NewExpr(
|
||||
"TestTable", "age", "age",
|
||||
contracts.EQ, contracts.PARAM,
|
||||
condition.EQ, condition.PARAM,
|
||||
false, "", "",
|
||||
))
|
||||
|
||||
@@ -79,15 +78,15 @@ func TestRelationEngine(t *testing.T) {
|
||||
return nil
|
||||
})
|
||||
|
||||
cond2 := condition.New(contracts.OR, "条件2").
|
||||
cond2 := condition.New(condition.OR, "条件2").
|
||||
SetExpr(condition.NewExpr(
|
||||
"TestTableA", "age", "age",
|
||||
contracts.EQ, contracts.PARAM,
|
||||
condition.EQ, condition.PARAM,
|
||||
false, "", "",
|
||||
)).
|
||||
SetExpr(condition.NewExpr(
|
||||
"TestTable", "age", "age",
|
||||
contracts.EQ, contracts.PARAM,
|
||||
condition.EQ, condition.PARAM,
|
||||
false, "", "",
|
||||
))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user