Documentation ¶
Index ¶
- func MoveDown(db *gorm.DB, value sortingInterface, pos int) error
- func MoveTo(db *gorm.DB, value sortingInterface, pos int) error
- func MoveUp(db *gorm.DB, value sortingInterface, pos int) error
- func RegisterCallbacks(db *gorm.DB)
- 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 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) ConfigureQorResource ¶
func (*Sorting) ConfigureQorResourceBeforeInitialize ¶
ConfigureQorResource 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.