Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Oct 26, 2020
2 parents 9120031 + 0779593 commit 68caaa7
Show file tree
Hide file tree
Showing 68 changed files with 1 addition and 16,419 deletions.
41 changes: 0 additions & 41 deletions GoMybatisSqlBuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package GoMybatis
import (
"fmt"
"github.com/zhuxiujia/GoMybatis/engines"
"github.com/zhuxiujia/GoMybatis/example"
"github.com/zhuxiujia/GoMybatis/lib/github.com/Knetic/govaluate"
"github.com/zhuxiujia/GoMybatis/lib/github.com/beevik/etree"
"github.com/zhuxiujia/GoMybatis/stmt"
"github.com/zhuxiujia/GoMybatis/utils"
Expand Down Expand Up @@ -118,45 +116,6 @@ func Test_SqlBuilder_Tps(t *testing.T) {
utils.CountMethodTps(100000, startTime, "Test_SqlBuilder_Tps")
}

func Test_reflect_tps(t *testing.T) {
var p = make(map[string]string)
var n = p
n["a"] = "b"
fmt.Println(p)

defer utils.CountMethodTps(10000, time.Now(), "Test_reflect_tps")

for k := 0; k < 10000; k++ {
evalExpression, _ := govaluate.NewEvaluableExpression("name != nil")
//fmt.Println(err)
var p = make(map[string]interface{})
p["name"] = "sdaf"
evalExpression.Evaluate(p)
//fmt.Println(err)
//fmt.Println(result)
}

}

func Test_bind_string(t *testing.T) {
var activity = example.Activity{
Id: "1",
DeleteFlag: 1,
}
var evaluateParameters = make(map[string]interface{})
evaluateParameters["activity"] = activity
var expression = "'%' + activity.Id + '%'"
evalExpression, err := govaluate.NewEvaluableExpression(expression)
if err != nil {
t.Fatal(err)
}
result, err := evalExpression.Evaluate(evaluateParameters)
if err != nil {
t.Fatal(err)
}
fmt.Println(result)
}

func TestGoMybatisSqlBuilder_BuildSql(t *testing.T) {
var mapper = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
Expand Down
49 changes: 0 additions & 49 deletions engines/ExpressionEngineExpr.go

This file was deleted.

215 changes: 0 additions & 215 deletions engines/ExpressionEngineExpr_test.go

This file was deleted.

58 changes: 0 additions & 58 deletions engines/ExpressionEngineGovaluate.go

This file was deleted.

Loading

0 comments on commit 68caaa7

Please sign in to comment.