From d84ea1a50d2d87abb0452424aca8c1a93ba087fb Mon Sep 17 00:00:00 2001 From: 15ho Date: Wed, 8 Dec 2021 13:10:29 +0800 Subject: [PATCH 1/2] fix TestCondition --- data/view/genfunc/genfunc_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/view/genfunc/genfunc_test.go b/data/view/genfunc/genfunc_test.go index a2f971e..b10dc71 100644 --- a/data/view/genfunc/genfunc_test.go +++ b/data/view/genfunc/genfunc_test.go @@ -142,8 +142,8 @@ func TestFuncFetchBy(t *testing.T) { func TestCondition(t *testing.T) { condition := model.Condition{} condition.And(model.AccountColumns.AccountID, ">=", "1") - condition.And(model.AccountColumns.UserID, "in", "1", "2", "3") - condition.Or(model.AccountColumns.Type, "in", "1", "2", "3") + condition.And(model.AccountColumns.UserID, "in", []string{"1", "2", "3"}) + condition.Or(model.AccountColumns.Type, "in", []string{"1", "2", "3"}) where, obj := condition.Get() fmt.Println(where) From 82895f7fcf33219bec4adcd23a37da827b63824f Mon Sep 17 00:00:00 2001 From: 15ho Date: Wed, 8 Dec 2021 14:48:33 +0800 Subject: [PATCH 2/2] fix #170 --- data/view/cnf/def.go | 1 + 1 file changed, 1 insertion(+) diff --git a/data/view/cnf/def.go b/data/view/cnf/def.go index eff28a4..9db5771 100644 --- a/data/view/cnf/def.go +++ b/data/view/cnf/def.go @@ -85,4 +85,5 @@ var TypeMysqlMatchList = []struct { {`^(integer)[(]\d+[)]`, "int"}, {`^(timestamp)[(]\d+[)]`, "time.Time"}, {`^(geometry)[(]\d+[)]`, "[]byte"}, + {`^(set)[(][\s\S]+[)]`, "string"}, }