Remove NewSession method from db.Engine interface (#17577)

* Remove NewSession method from db.Engine interface

* Fix bug

* Some improvements

* Fix bug

* Fix test

* Use XXXBean instead of XXXExample
This commit is contained in:
Lunny Xiao 2021-11-21 23:41:00 +08:00 committed by GitHub
parent 0add627182
commit d710af6669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 600 additions and 620 deletions

View file

@ -24,7 +24,7 @@ func GetPaginatedSession(p Paginator) *xorm.Session {
}
// SetSessionPagination sets pagination for a database session
func SetSessionPagination(sess *xorm.Session, p Paginator) *xorm.Session {
func SetSessionPagination(sess Engine, p Paginator) *xorm.Session {
skip, take := p.GetSkipTake()
return sess.Limit(take, skip)