zorm 1.3.2 发布,Golang 轻量级 ORM

zorm,golang 轻量级 ORM,readygo子项目

源码地址:https://gitee.com/chunanyong/zorm

go get gitee.com/chunanyong/zorm 

生产使用参考 UserStructService.go

更新内容如下:

  1. 增加达梦数据的分页适配
  2. 完善调整代码注释
  3. 增加存储过程和函数的调用示例

//TestProc 13.测试调用存储过程
func TestProc(t *testing.T) {
	user := permstruct.UserStruct{}
	finder := zorm.NewFinder().Append("call testproc(?) ", "u_10001")
	zorm.Query(ctx, finder, &user)
	fmt.Println(user)
}

//TestFunc 14.测试调用自定义函数
func TestFunc(t *testing.T) {
	userName := ""
	finder := zorm.NewFinder().Append("select testfunc(?) ", "u_10001")
	zorm.Query(ctx, finder, &userName)
	fmt.Println(userName)
}

猜你喜欢

转载自www.oschina.net/news/123221/zorm-1-3-2-released