filters

package
v0.0.0-...-ebe5785 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLimit = 10
View Source
const DefaultLimitStr = " LIMIT 10"

Variables

This section is empty.

Functions

func ApplyBoolField

func ApplyBoolField(fieldName string, values ...string) (conds string, args []interface{}, rErr error)

ApplyBoolField only applies first value from values.

func ApplyLimit

func ApplyLimit(query, value string) (queryResult string, limit int64, rErr error)

func ApplyNumField

func ApplyNumField(fieldName string, values ...string) (conds string, args []interface{}, rErr error)

func ApplyOffset

func ApplyOffset(query, value string) (queryResult string, offset int64, rErr error)

func ApplySorter

func ApplySorter(allowedFields map[string]bool, values ...string) (queryResult string, rErr error)

func ApplyTextField

func ApplyTextField(fieldName string, values ...string) (conds string, args []interface{}, rErr error)

func SortFieldAndDirection

func SortFieldAndDirection(allowedFields map[string]bool, value string) (col, dir string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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