mongo

package
v4.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Collection = "index"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Codex

type Codex struct {
	QueryNsProvider *meta.NsProvider
	QueryConfigs    configx.Values
	// contains filtered or unexported fields
}

func (*Codex) BuildQuery

func (m *Codex) BuildQuery(query interface{}, _, _ int32, _ string, _ bool) (interface{}, interface{}, error)

BuildQuery builds a mongo filter plus an Aggregation Pipeline to be performed for computing facets. Range and sorting parameters are not handled here, but by BuildQueryOptions method.

func (*Codex) BuildQueryOptions added in v4.4.0

func (m *Codex) BuildQueryOptions(_ interface{}, offset, limit int32, sortFields string, sortDesc bool) (interface{}, error)

BuildQueryOptions overrides basic range options with sortFields data

func (*Codex) FlushCustomFacets

func (m *Codex) FlushCustomFacets() []interface{}

func (*Codex) GetModel

func (m *Codex) GetModel(sc configx.Values) (interface{}, bool)

GetModel returns a mongodb.Model to be inserted in the db

func (*Codex) Marshal

func (m *Codex) Marshal(input interface{}) (interface{}, error)

Marshal does nothing here, input is already marshalled for indexing

func (*Codex) Unmarshal

func (m *Codex) Unmarshal(indexed interface{}) (interface{}, error)

Unmarshal gets a mongo.Cursor for Decoding

func (*Codex) UnmarshalFacet

func (m *Codex) UnmarshalFacet(data interface{}, facets chan interface{})

Jump to

Keyboard shortcuts

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