filters

package
v0.0.0-...-286e5f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Apply(db *gorm.DB, values []string) (*gorm.DB, error)
}

type NumFieldFilter

type NumFieldFilter struct {
	// contains filtered or unexported fields
}

func NumField

func NumField(field string) *NumFieldFilter

func (*NumFieldFilter) Apply

func (f *NumFieldFilter) Apply(db *gorm.DB, values []string) (*gorm.DB, error)

type SortFilter

type SortFilter struct {
	// contains filtered or unexported fields
}

func Sorter

func Sorter(allowByFields ...string) *SortFilter

func (*SortFilter) Apply

func (f *SortFilter) Apply(db *gorm.DB, values []string) (*gorm.DB, error)

type TextFieldFilter

type TextFieldFilter struct {
	// contains filtered or unexported fields
}

func TextField

func TextField(field string) *TextFieldFilter

func (*TextFieldFilter) Apply

func (f *TextFieldFilter) Apply(db *gorm.DB, values []string) (*gorm.DB, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL