Documentation ¶
Index ¶
- type Aggregate
- func (a *Aggregate) AllowDiskUse(allowDiskUse bool) *Aggregate
- func (a *Aggregate) BatchSize(batchSize int32) *Aggregate
- func (a *Aggregate) BypassDocumentValidation(bypassDocumentValidation bool) *Aggregate
- func (a *Aggregate) ClusterClock(clock *session.ClusterClock) *Aggregate
- func (a *Aggregate) Collation(collation bsoncore.Document) *Aggregate
- func (a *Aggregate) Collection(collection string) *Aggregate
- func (a *Aggregate) CommandMonitor(monitor *event.CommandMonitor) *Aggregate
- func (a *Aggregate) Comment(comment string) *Aggregate
- func (a *Aggregate) Crypt(crypt *driver.Crypt) *Aggregate
- func (a *Aggregate) Database(database string) *Aggregate
- func (a *Aggregate) Deployment(deployment driver.Deployment) *Aggregate
- func (a *Aggregate) Execute(ctx context.Context) error
- func (a *Aggregate) Hint(hint bsoncore.Value) *Aggregate
- func (a *Aggregate) MaxTimeMS(maxTimeMS int64) *Aggregate
- func (a *Aggregate) Pipeline(pipeline bsoncore.Document) *Aggregate
- func (a *Aggregate) ReadConcern(readConcern *readconcern.ReadConcern) *Aggregate
- func (a *Aggregate) ReadPreference(readPreference *readpref.ReadPref) *Aggregate
- func (a *Aggregate) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
- func (a *Aggregate) ResultCursorResponse() driver.CursorResponse
- func (a *Aggregate) Retry(retry driver.RetryMode) *Aggregate
- func (a *Aggregate) ServerSelector(selector description.ServerSelector) *Aggregate
- func (a *Aggregate) Session(session *session.Client) *Aggregate
- func (a *Aggregate) WriteConcern(writeConcern *writeconcern.WriteConcern) *Aggregate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶
type Aggregate struct {
// contains filtered or unexported fields
}
Performs an aggregate operation
func NewAggregate ¶
NewAggregate constructs and returns a new Aggregate.
func (*Aggregate) AllowDiskUse ¶
AllowDiskUse enables writing to temporary files. When true, aggregation stages can write to the dbPath/_tmp directory.
func (*Aggregate) BypassDocumentValidation ¶
BypassDocumentValidation allows the write to opt-out of document level validation. This only applies when the $out stage is specified.
func (*Aggregate) ClusterClock ¶
func (a *Aggregate) ClusterClock(clock *session.ClusterClock) *Aggregate
ClusterClock sets the cluster clock for this operation.
func (*Aggregate) Collation ¶
Collation specifies a collation. This option is only valid for server versions 3.4 and above.
func (*Aggregate) Collection ¶
Collection sets the collection that this command will run against.
func (*Aggregate) CommandMonitor ¶
func (a *Aggregate) CommandMonitor(monitor *event.CommandMonitor) *Aggregate
CommandMonitor sets the monitor to use for APM events.
func (*Aggregate) Comment ¶
Comment specifies an arbitrary string to help trace the operation through the database profiler, currentOp, and logs.
func (*Aggregate) Crypt ¶
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*Aggregate) Deployment ¶
func (a *Aggregate) Deployment(deployment driver.Deployment) *Aggregate
Deployment sets the deployment to use for this operation.
func (*Aggregate) Execute ¶
Execute runs this operations and returns an error if the operaiton did not execute successfully.
func (*Aggregate) MaxTimeMS ¶
MaxTimeMS specifies the maximum amount of time to allow the query to run.
func (*Aggregate) ReadConcern ¶
func (a *Aggregate) ReadConcern(readConcern *readconcern.ReadConcern) *Aggregate
ReadConcern specifies the read concern for this operation.
func (*Aggregate) ReadPreference ¶
ReadPreference set the read prefernce used with this operation.
func (*Aggregate) Result ¶
func (a *Aggregate) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
Result returns the result of executing this operation.
func (*Aggregate) ResultCursorResponse ¶
func (a *Aggregate) ResultCursorResponse() driver.CursorResponse
func (*Aggregate) Retry ¶
Retry enables retryable writes for this operation. Retries are not handled automatically, instead a boolean is returned from Execute and SelectAndExecute that indicates if the operation can be retried. Retrying is handled by calling RetryExecute.
func (*Aggregate) ServerSelector ¶
func (a *Aggregate) ServerSelector(selector description.ServerSelector) *Aggregate
ServerSelector sets the selector used to retrieve a server.
func (*Aggregate) WriteConcern ¶
func (a *Aggregate) WriteConcern(writeConcern *writeconcern.WriteConcern) *Aggregate
WriteConcern sets the write concern for this operation.