common

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyTextIndexed = "mongo:text-indexed"
)

Keys for the mapping.StructField or mapping.ModelStruct Store.

Variables

This section is empty.

Functions

func FieldName

func FieldName(field *mapping.StructField) string

FieldName returns the mongo field name for the provided *mapping.StructField.

func ParsePrimaryID added in v0.8.1

func ParsePrimaryID(v string) (interface{}, error)

ParsePrimaryID parses the primary field value 'v' from string into ObjectID or UUID.

func QueryDeleteOneOptions

func QueryDeleteOneOptions(s *query.Scope) *options.DeleteOptions

QueryDeleteOneOptions gets the options for the given query.Scope while updating one value.

func QueryFindOneOptions

func QueryFindOneOptions(s *query.Scope) *options.FindOneOptions

QueryFindOneOptions returns the find one options for given query.

func QueryFindOptions

func QueryFindOptions(s *query.Scope) *options.FindOptions

QueryFindOptions returns the find one options for given query.

func QueryProjection

func QueryProjection(s *query.Scope) bson.D

QueryProjection gets the query projection in the bson.D format.

func QueryUpdateOneOptions

func QueryUpdateOneOptions(s *query.Scope) *options.UpdateOptions

QueryUpdateOneOptions gets the options for the given query.Scope while updating one value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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