policy

package
v0.0.0-...-8f64e43 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IJoinPolicy

type IJoinPolicy interface {
	Join(left, right field.IFilterField) bson.D
	// contains filtered or unexported methods
}

IJoinPolicy is used to build bson filter which joins two fields (IFilterField) from different collections. It is moved to a separate interface to ensure that the IFilterField interface is not polluted with the logic related to joining fields, since there are different types of joins (left, right, inner, etc.) and each of them has its own logic. It is injected into the IFilterField as a dependency to perform the join.

func NewLeftOuterJoinPolicy

func NewLeftOuterJoinPolicy() IJoinPolicy

type IMergePolicy

type IMergePolicy interface {
	Merge(left, right field.IFilterField) bson.D
}

IMergePolicy is used to define the way of merging two fields (IFilterField). It is moved to a separate interface to ensure that the IFilterField interface is not polluted with the logic related to merging fields, since there are different types of merging (override, and, or, etc.) and each of them has its own logic. It is injected into the IFilterField as a dependency to perform different merge operations.

func NewAndMergePolicy

func NewAndMergePolicy() IMergePolicy

func NewNorMergePolicy

func NewNorMergePolicy() IMergePolicy

func NewNotMergePolicy

func NewNotMergePolicy() IMergePolicy

func NewOrMergePolicy

func NewOrMergePolicy() IMergePolicy

func NewOverrideMergePolicy

func NewOverrideMergePolicy() IMergePolicy

func NewXorMergePolicy

func NewXorMergePolicy() IMergePolicy

Jump to

Keyboard shortcuts

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