insort

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

insort

Sort + limit $in / $nin queries

Documentation

Index

Constants

View Source
const Name = "insort"

Variables

This section is empty.

Functions

func PreprocessFilter

func PreprocessFilter(filter bson.D, inLimit int) error

Types

type BsonDSlice

type BsonDSlice []bson.E

func (BsonDSlice) Len

func (p BsonDSlice) Len() int

func (BsonDSlice) Less

func (p BsonDSlice) Less(i, j int) bool

func (BsonDSlice) Sort

func (p BsonDSlice) Sort()

func (BsonDSlice) Swap

func (p BsonDSlice) Swap(i, j int)

type GenericSlice

type GenericSlice []interface{}

func (GenericSlice) Len

func (p GenericSlice) Len() int

func (GenericSlice) Less

func (p GenericSlice) Less(i, j int) bool

func (GenericSlice) Sort

func (p GenericSlice) Sort()

func (GenericSlice) Swap

func (p GenericSlice) Swap(i, j int)

type InLenError

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

func (InLenError) BSONError

func (i InLenError) BSONError() bson.D

TODO: better interface? TODO: better code?

func (InLenError) Error

func (i InLenError) Error() string

type InSortPlugin

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

This is a plugin that handles sending the request to the acutual downstream mongo

func (*InSortPlugin) Configure

func (p *InSortPlugin) Configure(d bson.D) error

Configure configures this plugin with the given configuration object. Returns an error if the configuration is invalid for the plugin.

func (*InSortPlugin) Name

func (p *InSortPlugin) Name() string

func (*InSortPlugin) Process

func (p *InSortPlugin) Process(ctx context.Context, r *plugins.Request, next plugins.PipelineFunc) (bson.D, error)

Process is the function executed when a message is called in the pipeline.

type InSortPluginConfig

type InSortPluginConfig struct {
	InLimit int `bson:"inlimit"`
}

Jump to

Keyboard shortcuts

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