package
0.0.0-20250308170929-48bd8ed27534
Repository: https://github.com/evergreen-ci/evergreen.git
Documentation: pkg.go.dev

# Packages

Package mgo provides support for Evergreen's remaining usages of the legacy MongoDB driver gopkg.in/mgo.v2.

# Functions

Aggregate runs an aggregation pipeline on a collection and unmarshals the results to the given "out" interface (usually a pointer to an array of structs/bson.M).
AggregateContext runs an aggregation pipeline on a collection and unmarshals the results to the given "out" interface (usually a pointer to an array of structs/bson.M).
AggregateWithMaxTime runs aggregate and specifies a max query time which ensures the query won't go on indefinitely when the request is cancelled.
Clear removes all documents from a specified collection.
ClearCollections clears all documents from all the specified collections, returning an error immediately if clearing any one of them fails.
No description provided by the author
Count run a count command with the specified query against the collection.
Count run a count command with the specified query against the collection.
CountQ runs a Q count query against the given collection.
CountQ runs a Q count query against the given collection.
CreateCollections ensures that all the given collections are created, returning an error immediately if creating any one of them fails.
DropCollections drops the specified collections, returning an error immediately if dropping any one of them fails.
EnsureIndex takes in a collection and ensures that the index is created if it does not already exist.
FindAllQ runs a Q query against the given collection, applying the results to "out.".
No description provided by the author
FindAndModify runs the specified query and change against the collection, unmarshaling the result into the specified interface.
FindOneQ runs a Q query against the given collection, applying the results to "out." Only reads one document from the DB.
FindOneQContext runs a Q query against the given collection, applying the results to "out." Only reads one document from the DB.
No description provided by the author
GetGridFile returns a ReadCloser for a file stored with the given name under the GridFS prefix.
Insert inserts the specified item into the specified collection.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsErrorCode checks if the error is a mongo error with the given error code.
Query creates a db.Q for the given MongoDB query.
Remove removes one item matching the query from the specified collection.
RemoveAll removes all items matching the query from the specified collection.
RemoveAllQ removes all docs that satisfy the query.
No description provided by the author
ReplaceContext replaces one matching document in the collection.
Update updates one matching document in the collection.
UpdateAll updates all matching documents in the collection.
UpdateAllContext updates all matching documents in the collection.
UpdateContext updates one matching document in the collection.
UpdateId updates one _id-matching document in the collection.
UpdateIdContext updates one _id-matching document in the collection.
Upsert run the specified update against the collection as an upsert operation.
UpsertContext run the specified update against the collection as an upsert operation.
WriteGridFile writes the data in the source Reader to a GridFS collection with the given prefix and filename.

# Constants

FacetPipelineStageTooLargeCode is the error code for when a facet pipeline stage is too large.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Q holds all information necessary to execute a query.

# Interfaces

No description provided by the author