Documentation ¶
Index ¶
- Constants
- func FieldName(field *mapping.StructField) string
- func ParsePrimaryID(v string) (interface{}, error)
- func QueryDeleteOneOptions(s *query.Scope) *options.DeleteOptions
- func QueryFindOneOptions(s *query.Scope) *options.FindOneOptions
- func QueryFindOptions(s *query.Scope) *options.FindOptions
- func QueryProjection(s *query.Scope) bson.D
- func QueryUpdateOneOptions(s *query.Scope) *options.UpdateOptions
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
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.