repox

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedAliasSetLower

func AllowedAliasSetLower(aliasMap map[string]string) map[string]struct{}

func ApplyExactFilters

func ApplyExactFilters(q *orm.Query, extras map[string]any, aliasMap map[string]string)

func ApplyLimitOffset

func ApplyLimitOffset(q *orm.Query, limit, offset int64) *orm.Query

func ApplyLimitOffsetPlusOne

func ApplyLimitOffsetPlusOne(q *orm.Query, limit, offset int64) *orm.Query

func BuildOrderExpr

func BuildOrderExpr[T any](
	items []T,
	fieldFn func(T) string,
	descFn func(T) bool,
	aliasMap map[string]string,
	defaultOrders ...string,
) []string

func Count

func Count(ctx context.Context, q *orm.Query) (int64, error)

func IsDuplicateErr

func IsDuplicateErr(err error) bool

func IsNoRowsErr

func IsNoRowsErr(err error) bool

func MapFieldToDB

func MapFieldToDB(alias string, aliasMap map[string]string) (string, bool)

func SafeColumns

func SafeColumns(requested []string, aliasMap map[string]string) []string

func TrimHasNext

func TrimHasNext[T any](rows []T, limit int64) ([]T, bool)

func WithNotDeleted

func WithNotDeleted(q *orm.Query) *orm.Query

Types

This section is empty.

Jump to

Keyboard shortcuts

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