gorm_advanced_filter

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clause

type Clause struct {
	Column       string    `json:"column"`
	FunctionName string    `json:"function_name"`
	Value        string    `json:"value"`
	Operator     string    `json:"operator"`
	Group        []*Clause `json:"group"`
}

type Filter

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

func MakeGormAdvancedFilter

func MakeGormAdvancedFilter(db *gorm.DB) *Filter

func Parse

func Parse(db *gorm.DB, input string) (*Filter, error)

func (*Filter) After

func (filter *Filter) After(value, column, operator string) *Filter

func (*Filter) At

func (filter *Filter) At(value, column, operator string) *Filter

func (*Filter) Before

func (filter *Filter) Before(value, column, operator string) *Filter

func (*Filter) Build

func (filter *Filter) Build() string

func (*Filter) Clear

func (filter *Filter) Clear() *Filter

func (*Filter) Contains

func (filter *Filter) Contains(value, column, operator string) *Filter

func (*Filter) DoesNotContains

func (filter *Filter) DoesNotContains(value, column, operator string) *Filter

func (*Filter) EndWith

func (filter *Filter) EndWith(value, column, operator string) *Filter

func (*Filter) Equal

func (filter *Filter) Equal(value, column, operator string) *Filter

func (*Filter) Is

func (filter *Filter) Is(value, column, operator string) *Filter

func (*Filter) IsNot

func (filter *Filter) IsNot(value, column, operator string) *Filter

func (*Filter) LessThan

func (filter *Filter) LessThan(value, column, operator string) *Filter

func (*Filter) LessThanEqual

func (filter *Filter) LessThanEqual(value, column, operator string) *Filter

func (*Filter) MoreThan

func (filter *Filter) MoreThan(value, column, operator string) *Filter

func (*Filter) MoreThanEqual

func (filter *Filter) MoreThanEqual(value, column, operator string) *Filter

func (*Filter) NotEqual

func (filter *Filter) NotEqual(value, column, operator string) *Filter

func (*Filter) StartWith

func (filter *Filter) StartWith(value, column, operator string) *Filter

func (*Filter) ToSql

func (filter *Filter) ToSql() *gorm.DB

Jump to

Keyboard shortcuts

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