Documentation ¶
Index ¶
- func MoveDown(db *aorm.DB, value sortingInterface, pos int) error
- func MoveTo(db *aorm.DB, value sortingInterface, pos int) error
- func MoveUp(db *aorm.DB, value sortingInterface, pos int) error
- func RegisterCallbacks(db *aorm.DB)
- type Plugin
- type SortableCollection
- func (sortableCollection *SortableCollection) ConfigureQorMeta(metaor resource.Metaor)
- func (sortableCollection *SortableCollection) Scan(value interface{}) error
- func (sortableCollection SortableCollection) Sort(results interface{}) error
- func (sortableCollection SortableCollection) Value() (driver.Value, error)
- type Sorting
- type SortingDESC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCallbacks ¶
RegisterCallbacks register callbacks into gorm db instance
Types ¶
type Plugin ¶
type Plugin struct { db.DBNames plug.EventDispatcher }
func (*Plugin) OnRegister ¶
func (p *Plugin) OnRegister()
type SortableCollection ¶
func (*SortableCollection) ConfigureQorMeta ¶
func (sortableCollection *SortableCollection) ConfigureQorMeta(metaor resource.Metaor)
func (*SortableCollection) Scan ¶
func (sortableCollection *SortableCollection) Scan(value interface{}) error
func (SortableCollection) Sort ¶
func (sortableCollection SortableCollection) Sort(results interface{}) error
type Sorting ¶
type Sorting struct {
Position int `sql:"DEFAULT:NULL"`
}
Sorting ascending mode
func (*Sorting) ConfigureResource ¶
ConfigureResource configure sorting for qor admin
func (Sorting) GetPosition ¶
GetPosition get current position
func (*Sorting) SetPosition ¶
SetPosition set position, only set field value, won't save
type SortingDESC ¶
type SortingDESC struct {
Sorting
}
SortingDESC descending mode
func (SortingDESC) SortingDesc ¶
func (SortingDESC) SortingDesc()
SortingDesc make your model sorting desc by default
Click to show internal directories.
Click to hide internal directories.