gorm-plus icon indicating copy to clipboard operation
gorm-plus copied to clipboard

Gorm-plus是基于Gorm的增强版,类似Mybatis-plus语法。Gorm-plus is based on an enhanced version of Gorm, similar to Mybatis-plus syntax.

Results 15 gorm-plus issues
Sort by recently updated
recently updated
newest added
trafficstars

我想使用gormplus进行关联表查询,但是似乎未找到该功能,后续还有计划添加和维护么

需求案例场景:子查询、自定义sql片段 伪代码: ```go var expectSql = "SELECT * FROM `Users` WHERE username = 'afumu' OR age = 20" sessionDb := checkSelectSql(t, expectSql) query, u := gplus.NewQuery[User]() query.Eq(&u.Username, "afumu").Or().Eq(&u.Age, 20).Apply("AND id...

enhancement

We need to connect to multiple databases in our project, but gplus's gorm as a global variable. can gplus support multi gorm??

![image](https://github.com/acmestack/gorm-plus/assets/44339602/16079405-de9f-4a41-a66e-c05fd73de9b5) 我这边用压测工具试了下。发现时间一长就出现 2024/02/03 12:14:52 C:/Users/lg/go/pkg/mod/github.com/acmestack/[email protected]/gplus/dao.go:172 dial tcp 127.0.0.1:3306: connectex: Only one usage of each socket address (protocol/network address/port) is normally permitted. 连接不够了。这个连接池的释放管理是不是有问题。下面查询语句一直都慢查询了。感觉似乎就是有空余连接没有释放卡住了。 还有另外一个是 2024/02/03 12:14:52 C:/Users/lg/go/pkg/mod/github.com/acmestack/[email protected]/gplus/dao.go:172 SLOW SQL >= 200ms...

在一些不需要跳页的场景下使用,相比于offset具有更好的性能。 伪代码如下: ```go type Comparable interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64...

enhancement

bug案例复现: ```go func TestSelectListOr(t *testing.T) { var expectSql = "SELECT * FROM `Users` WHERE username = 'afumu' OR age = 20" sessionDb := checkSelectSql(t, expectSql) query, u := gplus.NewQuery[User]() query.Eq(&u.Username,...

bug

add custom sql segment conditional support #76 fix bug: acmestack#75 supplementary submit

**Background & X Problem** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Proposal and Expectation** A clear and concise description of what...

enhancement

伪代码如下: ```go // 变量 user 为入参 query, u := gplus.NewQuery[User]() query.Eq(&u.Password, "12345678").Or(func(q *gplus.QueryCond[User]) { q.EqCond(user.Id > 0,&u.Id, user.Id). Or().EqCond(len(user.Account) > 0, &u.Account, user.Account). Or().EqCond(len(user.Email) > 0, &u.Email, user.Email). Or().EqCond(len(user.Phone) >...

bug