You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Go and system type/arch are you using?
go 1.21.6, windows11/amd64
What version of GoFrame are you using?
2.6.3
Can this bug be re-produced with the latest release?
yes
What did you do?
// when i run these codes there is a bug happen//my database is sql server , the method name "Page(page,linit)" generate sql of paging is by mysql , not sql server// i tracked the source code line is /* LIMIT. if !isCountStatement { if m.limit != 0 { if m.start >= 0 { conditionExtra += fmt.Sprintf(" LIMIT %d,%d", m.start, m.limit) } else { conditionExtra += fmt.Sprintf(" LIMIT %d", m.limit) } } else if limit1 { conditionExtra += " LIMIT 1" } if m.offset >= 0 { conditionExtra += fmt.Sprintf(" OFFSET %d", m.offset) }*//*of method name "func (m *Model) formatCondition( ctx context.Context, limit1 bool, isCountStatement bool,) (conditionWhere string, conditionExtra string, conditionArgs []interface{}) "of file "gdb_model_select.go" of "package gdb"*/model.OrderDesc("start_time").Page(req.PageNo, req.PageSize).ScanAndCount(&res.CarDistanceAlarms, &res.RecordCount, true)
What did you expect to see?
generate sql of paging should by current database type example sqlserver is "select * from student order by sno offset ((@pageIndex-1)*@pageSize) rows
fetch next @pageSize rows only;"
What did you see instead?
sql server database type generate sql of paging is "ORDER BY "start_time" DESC LIMIT 0,10" which is incorrect
The text was updated successfully, but these errors were encountered:
Hello @kim709394. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!
你好 @kim709394。我们喜欢您的提案/反馈,并希望您或其他社区成员通过拉取请求做出贡献。我们提前感谢您的贡献,并期待对其进行审查。
What version of
Go
and system type/arch are you using?go 1.21.6, windows11/amd64
What version of
GoFrame
are you using?2.6.3
Can this bug be re-produced with the latest release?
yes
What did you do?
What did you expect to see?
generate sql of paging should by current database type example sqlserver is "select * from student order by sno offset ((@pageIndex-1)*@pageSize) rows
fetch next @pageSize rows only;"
What did you see instead?
sql server database type generate sql of paging is "ORDER BY "start_time" DESC LIMIT 0,10" which is incorrect
The text was updated successfully, but these errors were encountered: