findopt

package
v0.0.0-...-be0592b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOpts = Opts{Limit: common.BKNoLimit}

DefaultOpts default opts

Functions

This section is empty.

Types

type FieldItem

type FieldItem struct {
	Name string
	Hide bool
}

FieldItem used to define the field codnition

type FindAndModify

type FindAndModify struct {
	Opts
	Remove bool
	Upsert bool
	New    bool
}

FindAndModify find and modify options

func (*FindAndModify) ConvertToMongoOptions

func (m *FindAndModify) ConvertToMongoOptions() *options.FindOneAndUpdateOptions

ConvertToMongoOptions convert to mongodb option

type Many

type Many struct {
	Opts
}

Many find many options

func (*Many) ConvertToMongoOptions

func (m *Many) ConvertToMongoOptions() *options.FindOptions

ConvertToMongoOptions convert find many opt into mongo options array

type One

type One struct {
	Opts
}

One find one options

func (*One) ConvertToMongoOptions

func (m *One) ConvertToMongoOptions() *options.FindOneOptions

ConvertToMongoOptions convert find many opt into mongo options array

type Opts

type Opts struct {
	Fields []FieldItem
	Sort   []SortItem
	Limit  int64
	Skip   int64
}

Opts options used to find and modify

type SortItem

type SortItem struct {
	Name       string
	Descending bool
}

SortItem used to define the sort condition

Jump to

Keyboard shortcuts

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