Documentation ¶
Overview ¶
Package mgo provides support for Evergreen's remaining usages of the legacy MongoDB driver gopkg.in/mgo.v2. This package exists solely for backward compatibility and should not be used anymore in newer code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BulkError ¶
type BulkError struct {
// contains filtered or unexported fields
}
BulkError holds an error returned from running a Bulk operation. Individual errors may be obtained and inspected via the Cases method.
func (*BulkError) Cases ¶
func (e *BulkError) Cases() []BulkErrorCase
Cases returns all individual errors found while attempting the requested changes.
See the documentation of BulkErrorCase for limitations in older MongoDB releases.
type BulkErrorCase ¶
type BulkErrorCase struct { Index int // Position of operation that failed, or -1 if unknown. Err error }
BulkErrorCase holds an individual error found while attempting a single change within a bulk operation, and the position in which it was enqueued.
MongoDB servers older than version 2.6 do not have proper support for bulk operations, so the driver attempts to map its API as much as possible into the functionality that works. In particular, only the last error is reported for bulk inserts and without any positional information, so the Index field is set to -1 in these cases.
type LastError ¶
type QueryError ¶
func (*QueryError) Error ¶
func (err *QueryError) Error() string
Directories ¶
Path | Synopsis |
---|---|
Package bson is an implementation of the BSON specification for Go:
|
Package bson is an implementation of the BSON specification for Go: |
internal
|
|
json
Package json implements encoding and decoding of JSON as defined in RFC 4627.
|
Package json implements encoding and decoding of JSON as defined in RFC 4627. |