mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-22 10:33:13 +00:00
AutoForm, ObjectById/ObjectGetReq/ObjectDeleteReq, Pagination, GeneralDelDto/GeneralGetDto and Index/Control are now type aliases of go-admin-core's sdk/contract/dto; OrderDest, MakeCondition and Paginate forward to the same package (functions cannot be aliased the way types can). MakeCondition no longer reads common/global.Driver to choose which SQL dialect to resolve search tags against. The lowered version reads db.Dialector.Name() from inside the closure it returns instead, which is always the driver the caller's own *gorm.DB is bound to - correct even with more than one database open with different drivers, which a single process-wide variable could never be. global.Driver is marked Deprecated accordingly; it is still set and still readable for fork code that reads it directly. PRD 006 F2/F5. Claude-Session: https://claude.ai/code/session_01HPTAw8b8tAdFNFn8rKdPYx
15 lines
439 B
Go
15 lines
439 B
Go
package dto
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
|
|
contractdto "github.com/go-admin-team/go-admin-core/v2/sdk/contract/dto"
|
|
)
|
|
|
|
// OrderDest forwards to go-admin-core's sdk/contract/dto (PRD 006 F2/F5). A
|
|
// function cannot be aliased the way a type can, so this is a pure
|
|
// pass-through rather than a `func X = pkg.X` form Go does not have.
|
|
func OrderDest(sort string, bl bool) func(db *gorm.DB) *gorm.DB {
|
|
return contractdto.OrderDest(sort, bl)
|
|
}
|