databases

package
v1.6.21 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPaginationToMongoFilter

func ConvertPaginationToMongoFilter(config *types.PaginationConfig) (bson.M, *options.FindOptions, error)

ConvertPaginationToMongoFilter converts a PaginationConfig into a MongoDB filter and FindOptions. It takes a PaginationConfig as input and returns a bson.M filter, *options.FindOptions, and an error. The filter is constructed based on the pagination parameters such as offset, limit, sort, search, and filters. The FindOptions are set based on the limit and skip values. The function supports various filter operators such as equal, not equal, greater than, greater than or equal to, less than, less than or equal to, in, not in, like, and not like. If an unsupported operator is encountered, an error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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