|
|
@@ -0,0 +1,21 @@
|
|
|
+package postgre
|
|
|
+
|
|
|
+type FuncTest struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (f FuncTest) TestAdd(optUserId int, jsonStr string, verfStr string) (err error) {
|
|
|
+
|
|
|
+ result := map[string]interface{}{}
|
|
|
+ //err = getClient().Exec("select demo_tmp_user_add(? ,? ,? )",optUserId,jsonStr,verfStr).Error
|
|
|
+ err = getClient().Raw("select demo_tmp_user_add(? ,? ,? )", optUserId, jsonStr, verfStr).Scan(&result).Error
|
|
|
+ return
|
|
|
+}
|
|
|
+func (f FuncTest) TestQuery1(optUserId int, jsonStr string, verfStr string) (err error) {
|
|
|
+
|
|
|
+ result := map[string]interface{}{}
|
|
|
+ //row1,err_ := getClient().Raw("select demo_tmp_user_query(? ,? ,? )",optUserId,jsonStr,verfStr).Rows()
|
|
|
+ err = getClient().Raw("select demo_tmp_user_query(? ,? ,? )", optUserId, jsonStr, verfStr).Scan(&result).Error
|
|
|
+ //row1.Scan(&result)
|
|
|
+ //println(result)
|
|
|
+ return
|
|
|
+}
|