filterPkg

package
v0.0.0-...-98a7bba Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLimit = 500
View Source
const NoLimit = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Operations

type Operations struct {
	Eq      map[string]interface{}
	NotEq   map[string]interface{}
	In      map[string][]interface{}
	NotIn   map[string][]interface{}
	Like    map[string]string
	NotLike map[string]string
}

type Params

type Params struct {
	Operations     Operations
	And            *Params
	Or             *Params
	Limit          uint64
	Offset         uint64
	IncludeDeleted bool
}

type ParamsBuilder

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

func NewParamsBuilder

func NewParamsBuilder() *ParamsBuilder

func (*ParamsBuilder) And

func (p *ParamsBuilder) And(params Params) *ParamsBuilder

func (ParamsBuilder) Build

func (p ParamsBuilder) Build() Params

func (*ParamsBuilder) Equals

func (p *ParamsBuilder) Equals(field string, value interface{}) *ParamsBuilder

func (*ParamsBuilder) In

func (p *ParamsBuilder) In(field string, values ...interface{}) *ParamsBuilder

func (*ParamsBuilder) Like

func (p *ParamsBuilder) Like(field string, value string) *ParamsBuilder

func (*ParamsBuilder) Limit

func (p *ParamsBuilder) Limit(limit uint64) *ParamsBuilder

func (*ParamsBuilder) NotEquals

func (p *ParamsBuilder) NotEquals(field string, value interface{}) *ParamsBuilder

func (*ParamsBuilder) NotIn

func (p *ParamsBuilder) NotIn(field string, values ...interface{}) *ParamsBuilder

func (*ParamsBuilder) NotLike

func (p *ParamsBuilder) NotLike(field string, value string) *ParamsBuilder

func (*ParamsBuilder) Offset

func (p *ParamsBuilder) Offset(offset uint64) *ParamsBuilder

func (*ParamsBuilder) Or

func (p *ParamsBuilder) Or(params Params) *ParamsBuilder

Jump to

Keyboard shortcuts

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