Documentation ¶
Overview ¶
Package operation is intended for internal use only. It is made available to facilitate use cases that require access to internal MongoDB driver functionality and state. The API of this package is not stable and there is no backward compatibility guarantee.
WARNING: THIS PACKAGE IS EXPERIMENTAL AND MAY BE MODIFIED OR REMOVED WITHOUT NOTICE! USE WITH EXTREME CAUTION!
Index ¶
- type AbortTransaction
- func (at *AbortTransaction) Authenticator(authenticator driver.Authenticator) *AbortTransaction
- func (at *AbortTransaction) ClusterClock(clock *session.ClusterClock) *AbortTransaction
- func (at *AbortTransaction) Collection(collection string) *AbortTransaction
- func (at *AbortTransaction) CommandMonitor(monitor *event.CommandMonitor) *AbortTransaction
- func (at *AbortTransaction) Crypt(crypt driver.Crypt) *AbortTransaction
- func (at *AbortTransaction) Database(database string) *AbortTransaction
- func (at *AbortTransaction) Deployment(deployment driver.Deployment) *AbortTransaction
- func (at *AbortTransaction) Execute(ctx context.Context) error
- func (at *AbortTransaction) RecoveryToken(recoveryToken bsoncore.Document) *AbortTransaction
- func (at *AbortTransaction) Retry(retry driver.RetryMode) *AbortTransaction
- func (at *AbortTransaction) ServerAPI(serverAPI *driver.ServerAPIOptions) *AbortTransaction
- func (at *AbortTransaction) ServerSelector(selector description.ServerSelector) *AbortTransaction
- func (at *AbortTransaction) Session(session *session.Client) *AbortTransaction
- func (at *AbortTransaction) WriteConcern(writeConcern *writeconcern.WriteConcern) *AbortTransaction
- type Aggregate
- func (a *Aggregate) AllowDiskUse(allowDiskUse bool) *Aggregate
- func (a *Aggregate) Authenticator(authenticator driver.Authenticator) *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 bsoncore.Value) *Aggregate
- func (a *Aggregate) Crypt(crypt driver.Crypt) *Aggregate
- func (a *Aggregate) CustomOptions(co map[string]bsoncore.Value) *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) HasOutputStage(hos bool) *Aggregate
- func (a *Aggregate) Hint(hint bsoncore.Value) *Aggregate
- func (a *Aggregate) Let(let bsoncore.Document) *Aggregate
- func (a *Aggregate) OmitMaxTimeMS(omit bool) *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) ServerAPI(serverAPI *driver.ServerAPIOptions) *Aggregate
- func (a *Aggregate) ServerSelector(selector description.ServerSelector) *Aggregate
- func (a *Aggregate) Session(session *session.Client) *Aggregate
- func (a *Aggregate) Timeout(timeout *time.Duration) *Aggregate
- func (a *Aggregate) WriteConcern(writeConcern *writeconcern.WriteConcern) *Aggregate
- type Command
- func (c *Command) Authenticator(authenticator driver.Authenticator) *Command
- func (c *Command) ClusterClock(clock *session.ClusterClock) *Command
- func (c *Command) CommandMonitor(monitor *event.CommandMonitor) *Command
- func (c *Command) Crypt(crypt driver.Crypt) *Command
- func (c *Command) Database(database string) *Command
- func (c *Command) Deployment(deployment driver.Deployment) *Command
- func (c *Command) Execute(ctx context.Context) error
- func (c *Command) Logger(logger *logger.Logger) *Command
- func (c *Command) ReadPreference(readPreference *readpref.ReadPref) *Command
- func (c *Command) Result() bsoncore.Document
- func (c *Command) ResultCursor() (*driver.BatchCursor, error)
- func (c *Command) ServerAPI(serverAPI *driver.ServerAPIOptions) *Command
- func (c *Command) ServerSelector(selector description.ServerSelector) *Command
- func (c *Command) Session(session *session.Client) *Command
- func (c *Command) Timeout(timeout *time.Duration) *Command
- type CommitTransaction
- func (ct *CommitTransaction) Authenticator(authenticator driver.Authenticator) *CommitTransaction
- func (ct *CommitTransaction) ClusterClock(clock *session.ClusterClock) *CommitTransaction
- func (ct *CommitTransaction) CommandMonitor(monitor *event.CommandMonitor) *CommitTransaction
- func (ct *CommitTransaction) Crypt(crypt driver.Crypt) *CommitTransaction
- func (ct *CommitTransaction) Database(database string) *CommitTransaction
- func (ct *CommitTransaction) Deployment(deployment driver.Deployment) *CommitTransaction
- func (ct *CommitTransaction) Execute(ctx context.Context) error
- func (ct *CommitTransaction) RecoveryToken(recoveryToken bsoncore.Document) *CommitTransaction
- func (ct *CommitTransaction) Retry(retry driver.RetryMode) *CommitTransaction
- func (ct *CommitTransaction) ServerAPI(serverAPI *driver.ServerAPIOptions) *CommitTransaction
- func (ct *CommitTransaction) ServerSelector(selector description.ServerSelector) *CommitTransaction
- func (ct *CommitTransaction) Session(session *session.Client) *CommitTransaction
- func (ct *CommitTransaction) WriteConcern(writeConcern *writeconcern.WriteConcern) *CommitTransaction
- type Count
- func (c *Count) Authenticator(authenticator driver.Authenticator) *Count
- func (c *Count) ClusterClock(clock *session.ClusterClock) *Count
- func (c *Count) Collection(collection string) *Count
- func (c *Count) CommandMonitor(monitor *event.CommandMonitor) *Count
- func (c *Count) Comment(comment bsoncore.Value) *Count
- func (c *Count) Crypt(crypt driver.Crypt) *Count
- func (c *Count) Database(database string) *Count
- func (c *Count) Deployment(deployment driver.Deployment) *Count
- func (c *Count) Execute(ctx context.Context) error
- func (c *Count) Query(query bsoncore.Document) *Count
- func (c *Count) ReadConcern(readConcern *readconcern.ReadConcern) *Count
- func (c *Count) ReadPreference(readPreference *readpref.ReadPref) *Count
- func (c *Count) Result() CountResult
- func (c *Count) Retry(retry driver.RetryMode) *Count
- func (c *Count) ServerAPI(serverAPI *driver.ServerAPIOptions) *Count
- func (c *Count) ServerSelector(selector description.ServerSelector) *Count
- func (c *Count) Session(session *session.Client) *Count
- func (c *Count) Timeout(timeout *time.Duration) *Count
- type CountResult
- type Create
- func (c *Create) Authenticator(authenticator driver.Authenticator) *Create
- func (c *Create) Capped(capped bool) *Create
- func (c *Create) ChangeStreamPreAndPostImages(csppi bsoncore.Document) *Create
- func (c *Create) ClusterClock(clock *session.ClusterClock) *Create
- func (c *Create) ClusteredIndex(ci bsoncore.Document) *Create
- func (c *Create) Collation(collation bsoncore.Document) *Create
- func (c *Create) CollectionName(collectionName string) *Create
- func (c *Create) CommandMonitor(monitor *event.CommandMonitor) *Create
- func (c *Create) Crypt(crypt driver.Crypt) *Create
- func (c *Create) Database(database string) *Create
- func (c *Create) Deployment(deployment driver.Deployment) *Create
- func (c *Create) EncryptedFields(ef bsoncore.Document) *Create
- func (c *Create) Execute(ctx context.Context) error
- func (c *Create) ExpireAfterSeconds(eas int64) *Create
- func (c *Create) IndexOptionDefaults(indexOptionDefaults bsoncore.Document) *Create
- func (c *Create) Max(max int64) *Create
- func (c *Create) Pipeline(pipeline bsoncore.Document) *Create
- func (c *Create) ServerAPI(serverAPI *driver.ServerAPIOptions) *Create
- func (c *Create) ServerSelector(selector description.ServerSelector) *Create
- func (c *Create) Session(session *session.Client) *Create
- func (c *Create) Size(size int64) *Create
- func (c *Create) StorageEngine(storageEngine bsoncore.Document) *Create
- func (c *Create) TimeSeries(timeSeries bsoncore.Document) *Create
- func (c *Create) ValidationAction(validationAction string) *Create
- func (c *Create) ValidationLevel(validationLevel string) *Create
- func (c *Create) Validator(validator bsoncore.Document) *Create
- func (c *Create) ViewOn(viewOn string) *Create
- func (c *Create) WriteConcern(writeConcern *writeconcern.WriteConcern) *Create
- type CreateIndexes
- func (ci *CreateIndexes) Authenticator(authenticator driver.Authenticator) *CreateIndexes
- func (ci *CreateIndexes) ClusterClock(clock *session.ClusterClock) *CreateIndexes
- func (ci *CreateIndexes) Collection(collection string) *CreateIndexes
- func (ci *CreateIndexes) CommandMonitor(monitor *event.CommandMonitor) *CreateIndexes
- func (ci *CreateIndexes) CommitQuorum(commitQuorum bsoncore.Value) *CreateIndexes
- func (ci *CreateIndexes) Crypt(crypt driver.Crypt) *CreateIndexes
- func (ci *CreateIndexes) Database(database string) *CreateIndexes
- func (ci *CreateIndexes) Deployment(deployment driver.Deployment) *CreateIndexes
- func (ci *CreateIndexes) Execute(ctx context.Context) error
- func (ci *CreateIndexes) Indexes(indexes bsoncore.Document) *CreateIndexes
- func (ci *CreateIndexes) Result() CreateIndexesResult
- func (ci *CreateIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *CreateIndexes
- func (ci *CreateIndexes) ServerSelector(selector description.ServerSelector) *CreateIndexes
- func (ci *CreateIndexes) Session(session *session.Client) *CreateIndexes
- func (ci *CreateIndexes) Timeout(timeout *time.Duration) *CreateIndexes
- func (ci *CreateIndexes) WriteConcern(writeConcern *writeconcern.WriteConcern) *CreateIndexes
- type CreateIndexesResult
- type CreateSearchIndexResult
- type CreateSearchIndexes
- func (csi *CreateSearchIndexes) Authenticator(authenticator driver.Authenticator) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) ClusterClock(clock *session.ClusterClock) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Collection(collection string) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) CommandMonitor(monitor *event.CommandMonitor) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Crypt(crypt driver.Crypt) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Database(database string) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Deployment(deployment driver.Deployment) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Execute(ctx context.Context) error
- func (csi *CreateSearchIndexes) Indexes(indexes bsoncore.Document) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Result() CreateSearchIndexesResult
- func (csi *CreateSearchIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) ServerSelector(selector description.ServerSelector) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Session(session *session.Client) *CreateSearchIndexes
- func (csi *CreateSearchIndexes) Timeout(timeout *time.Duration) *CreateSearchIndexes
- type CreateSearchIndexesResult
- type Delete
- func (d *Delete) Authenticator(authenticator driver.Authenticator) *Delete
- func (d *Delete) ClusterClock(clock *session.ClusterClock) *Delete
- func (d *Delete) Collection(collection string) *Delete
- func (d *Delete) CommandMonitor(monitor *event.CommandMonitor) *Delete
- func (d *Delete) Comment(comment bsoncore.Value) *Delete
- func (d *Delete) Crypt(crypt driver.Crypt) *Delete
- func (d *Delete) Database(database string) *Delete
- func (d *Delete) Deletes(deletes ...bsoncore.Document) *Delete
- func (d *Delete) Deployment(deployment driver.Deployment) *Delete
- func (d *Delete) Execute(ctx context.Context) error
- func (d *Delete) Hint(hint bool) *Delete
- func (d *Delete) Let(let bsoncore.Document) *Delete
- func (d *Delete) Logger(logger *logger.Logger) *Delete
- func (d *Delete) Ordered(ordered bool) *Delete
- func (d *Delete) Result() DeleteResult
- func (d *Delete) Retry(retry driver.RetryMode) *Delete
- func (d *Delete) ServerAPI(serverAPI *driver.ServerAPIOptions) *Delete
- func (d *Delete) ServerSelector(selector description.ServerSelector) *Delete
- func (d *Delete) Session(session *session.Client) *Delete
- func (d *Delete) Timeout(timeout *time.Duration) *Delete
- func (d *Delete) WriteConcern(writeConcern *writeconcern.WriteConcern) *Delete
- type DeleteResult
- type Distinct
- func (d *Distinct) Authenticator(authenticator driver.Authenticator) *Distinct
- func (d *Distinct) ClusterClock(clock *session.ClusterClock) *Distinct
- func (d *Distinct) Collation(collation bsoncore.Document) *Distinct
- func (d *Distinct) Collection(collection string) *Distinct
- func (d *Distinct) CommandMonitor(monitor *event.CommandMonitor) *Distinct
- func (d *Distinct) Comment(comment bsoncore.Value) *Distinct
- func (d *Distinct) Crypt(crypt driver.Crypt) *Distinct
- func (d *Distinct) Database(database string) *Distinct
- func (d *Distinct) Deployment(deployment driver.Deployment) *Distinct
- func (d *Distinct) Execute(ctx context.Context) error
- func (d *Distinct) Hint(hint bsoncore.Value) *Distinct
- func (d *Distinct) Key(key string) *Distinct
- func (d *Distinct) Query(query bsoncore.Document) *Distinct
- func (d *Distinct) ReadConcern(readConcern *readconcern.ReadConcern) *Distinct
- func (d *Distinct) ReadPreference(readPreference *readpref.ReadPref) *Distinct
- func (d *Distinct) Result() DistinctResult
- func (d *Distinct) Retry(retry driver.RetryMode) *Distinct
- func (d *Distinct) ServerAPI(serverAPI *driver.ServerAPIOptions) *Distinct
- func (d *Distinct) ServerSelector(selector description.ServerSelector) *Distinct
- func (d *Distinct) Session(session *session.Client) *Distinct
- func (d *Distinct) Timeout(timeout *time.Duration) *Distinct
- type DistinctResult
- type DropCollection
- func (dc *DropCollection) Authenticator(authenticator driver.Authenticator) *DropCollection
- func (dc *DropCollection) ClusterClock(clock *session.ClusterClock) *DropCollection
- func (dc *DropCollection) Collection(collection string) *DropCollection
- func (dc *DropCollection) CommandMonitor(monitor *event.CommandMonitor) *DropCollection
- func (dc *DropCollection) Crypt(crypt driver.Crypt) *DropCollection
- func (dc *DropCollection) Database(database string) *DropCollection
- func (dc *DropCollection) Deployment(deployment driver.Deployment) *DropCollection
- func (dc *DropCollection) Execute(ctx context.Context) error
- func (dc *DropCollection) Result() DropCollectionResult
- func (dc *DropCollection) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropCollection
- func (dc *DropCollection) ServerSelector(selector description.ServerSelector) *DropCollection
- func (dc *DropCollection) Session(session *session.Client) *DropCollection
- func (dc *DropCollection) Timeout(timeout *time.Duration) *DropCollection
- func (dc *DropCollection) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropCollection
- type DropCollectionResult
- type DropDatabase
- func (dd *DropDatabase) Authenticator(authenticator driver.Authenticator) *DropDatabase
- func (dd *DropDatabase) ClusterClock(clock *session.ClusterClock) *DropDatabase
- func (dd *DropDatabase) CommandMonitor(monitor *event.CommandMonitor) *DropDatabase
- func (dd *DropDatabase) Crypt(crypt driver.Crypt) *DropDatabase
- func (dd *DropDatabase) Database(database string) *DropDatabase
- func (dd *DropDatabase) Deployment(deployment driver.Deployment) *DropDatabase
- func (dd *DropDatabase) Execute(ctx context.Context) error
- func (dd *DropDatabase) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropDatabase
- func (dd *DropDatabase) ServerSelector(selector description.ServerSelector) *DropDatabase
- func (dd *DropDatabase) Session(session *session.Client) *DropDatabase
- func (dd *DropDatabase) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropDatabase
- type DropIndexes
- func (di *DropIndexes) Authenticator(authenticator driver.Authenticator) *DropIndexes
- func (di *DropIndexes) ClusterClock(clock *session.ClusterClock) *DropIndexes
- func (di *DropIndexes) Collection(collection string) *DropIndexes
- func (di *DropIndexes) CommandMonitor(monitor *event.CommandMonitor) *DropIndexes
- func (di *DropIndexes) Crypt(crypt driver.Crypt) *DropIndexes
- func (di *DropIndexes) Database(database string) *DropIndexes
- func (di *DropIndexes) Deployment(deployment driver.Deployment) *DropIndexes
- func (di *DropIndexes) Execute(ctx context.Context) error
- func (di *DropIndexes) Index(index any) *DropIndexes
- func (di *DropIndexes) Result() DropIndexesResult
- func (di *DropIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropIndexes
- func (di *DropIndexes) ServerSelector(selector description.ServerSelector) *DropIndexes
- func (di *DropIndexes) Session(session *session.Client) *DropIndexes
- func (di *DropIndexes) Timeout(timeout *time.Duration) *DropIndexes
- func (di *DropIndexes) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropIndexes
- type DropIndexesResult
- type DropSearchIndex
- func (dsi *DropSearchIndex) Authenticator(authenticator driver.Authenticator) *DropSearchIndex
- func (dsi *DropSearchIndex) ClusterClock(clock *session.ClusterClock) *DropSearchIndex
- func (dsi *DropSearchIndex) Collection(collection string) *DropSearchIndex
- func (dsi *DropSearchIndex) CommandMonitor(monitor *event.CommandMonitor) *DropSearchIndex
- func (dsi *DropSearchIndex) Crypt(crypt driver.Crypt) *DropSearchIndex
- func (dsi *DropSearchIndex) Database(database string) *DropSearchIndex
- func (dsi *DropSearchIndex) Deployment(deployment driver.Deployment) *DropSearchIndex
- func (dsi *DropSearchIndex) Execute(ctx context.Context) error
- func (dsi *DropSearchIndex) Index(index string) *DropSearchIndex
- func (dsi *DropSearchIndex) Result() DropSearchIndexResult
- func (dsi *DropSearchIndex) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropSearchIndex
- func (dsi *DropSearchIndex) ServerSelector(selector description.ServerSelector) *DropSearchIndex
- func (dsi *DropSearchIndex) Session(session *session.Client) *DropSearchIndex
- func (dsi *DropSearchIndex) Timeout(timeout *time.Duration) *DropSearchIndex
- type DropSearchIndexResult
- type EndSessions
- func (es *EndSessions) Authenticator(authenticator driver.Authenticator) *EndSessions
- func (es *EndSessions) ClusterClock(clock *session.ClusterClock) *EndSessions
- func (es *EndSessions) CommandMonitor(monitor *event.CommandMonitor) *EndSessions
- func (es *EndSessions) Crypt(crypt driver.Crypt) *EndSessions
- func (es *EndSessions) Database(database string) *EndSessions
- func (es *EndSessions) Deployment(deployment driver.Deployment) *EndSessions
- func (es *EndSessions) Execute(ctx context.Context) error
- func (es *EndSessions) ServerAPI(serverAPI *driver.ServerAPIOptions) *EndSessions
- func (es *EndSessions) ServerSelector(selector description.ServerSelector) *EndSessions
- func (es *EndSessions) Session(session *session.Client) *EndSessions
- func (es *EndSessions) SessionIDs(sessionIDs bsoncore.Document) *EndSessions
- type Find
- func (f *Find) AllowDiskUse(allowDiskUse bool) *Find
- func (f *Find) AllowPartialResults(allowPartialResults bool) *Find
- func (f *Find) Authenticator(authenticator driver.Authenticator) *Find
- func (f *Find) AwaitData(awaitData bool) *Find
- func (f *Find) BatchSize(batchSize int32) *Find
- func (f *Find) ClusterClock(clock *session.ClusterClock) *Find
- func (f *Find) Collation(collation bsoncore.Document) *Find
- func (f *Find) Collection(collection string) *Find
- func (f *Find) CommandMonitor(monitor *event.CommandMonitor) *Find
- func (f *Find) Comment(comment bsoncore.Value) *Find
- func (f *Find) Crypt(crypt driver.Crypt) *Find
- func (f *Find) Database(database string) *Find
- func (f *Find) Deployment(deployment driver.Deployment) *Find
- func (f *Find) Execute(ctx context.Context) error
- func (f *Find) Filter(filter bsoncore.Document) *Find
- func (f *Find) Hint(hint bsoncore.Value) *Find
- func (f *Find) Let(let bsoncore.Document) *Find
- func (f *Find) Limit(limit int64) *Find
- func (f *Find) Logger(logger *logger.Logger) *Find
- func (f *Find) Max(max bsoncore.Document) *Find
- func (f *Find) Min(min bsoncore.Document) *Find
- func (f *Find) NoCursorTimeout(noCursorTimeout bool) *Find
- func (f *Find) OmitMaxTimeMS(omit bool) *Find
- func (f *Find) OplogReplay(oplogReplay bool) *Find
- func (f *Find) Projection(projection bsoncore.Document) *Find
- func (f *Find) ReadConcern(readConcern *readconcern.ReadConcern) *Find
- func (f *Find) ReadPreference(readPreference *readpref.ReadPref) *Find
- func (f *Find) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
- func (f *Find) Retry(retry driver.RetryMode) *Find
- func (f *Find) ReturnKey(returnKey bool) *Find
- func (f *Find) ServerAPI(serverAPI *driver.ServerAPIOptions) *Find
- func (f *Find) ServerSelector(selector description.ServerSelector) *Find
- func (f *Find) Session(session *session.Client) *Find
- func (f *Find) ShowRecordID(showRecordID bool) *Find
- func (f *Find) SingleBatch(singleBatch bool) *Find
- func (f *Find) Skip(skip int64) *Find
- func (f *Find) Snapshot(snapshot bool) *Find
- func (f *Find) Sort(sort bsoncore.Document) *Find
- func (f *Find) Tailable(tailable bool) *Find
- func (f *Find) Timeout(timeout *time.Duration) *Find
- type FindAndModify
- func (fam *FindAndModify) ArrayFilters(arrayFilters bsoncore.Array) *FindAndModify
- func (fam *FindAndModify) Authenticator(authenticator driver.Authenticator) *FindAndModify
- func (fam *FindAndModify) BypassDocumentValidation(bypassDocumentValidation bool) *FindAndModify
- func (fam *FindAndModify) ClusterClock(clock *session.ClusterClock) *FindAndModify
- func (fam *FindAndModify) Collation(collation bsoncore.Document) *FindAndModify
- func (fam *FindAndModify) Collection(collection string) *FindAndModify
- func (fam *FindAndModify) CommandMonitor(monitor *event.CommandMonitor) *FindAndModify
- func (fam *FindAndModify) Comment(comment bsoncore.Value) *FindAndModify
- func (fam *FindAndModify) Crypt(crypt driver.Crypt) *FindAndModify
- func (fam *FindAndModify) Database(database string) *FindAndModify
- func (fam *FindAndModify) Deployment(deployment driver.Deployment) *FindAndModify
- func (fam *FindAndModify) Execute(ctx context.Context) error
- func (fam *FindAndModify) Fields(fields bsoncore.Document) *FindAndModify
- func (fam *FindAndModify) Hint(hint bsoncore.Value) *FindAndModify
- func (fam *FindAndModify) Let(let bsoncore.Document) *FindAndModify
- func (fam *FindAndModify) NewDocument(newDocument bool) *FindAndModify
- func (fam *FindAndModify) Query(query bsoncore.Document) *FindAndModify
- func (fam *FindAndModify) Remove(remove bool) *FindAndModify
- func (fam *FindAndModify) Result() FindAndModifyResult
- func (fam *FindAndModify) Retry(retry driver.RetryMode) *FindAndModify
- func (fam *FindAndModify) ServerAPI(serverAPI *driver.ServerAPIOptions) *FindAndModify
- func (fam *FindAndModify) ServerSelector(selector description.ServerSelector) *FindAndModify
- func (fam *FindAndModify) Session(session *session.Client) *FindAndModify
- func (fam *FindAndModify) Sort(sort bsoncore.Document) *FindAndModify
- func (fam *FindAndModify) Timeout(timeout *time.Duration) *FindAndModify
- func (fam *FindAndModify) Update(update bsoncore.Value) *FindAndModify
- func (fam *FindAndModify) Upsert(upsert bool) *FindAndModify
- func (fam *FindAndModify) WriteConcern(writeConcern *writeconcern.WriteConcern) *FindAndModify
- type FindAndModifyResult
- type Hello
- func (h *Hello) AppName(appname string) *Hello
- func (h *Hello) Authenticator(authenticator driver.Authenticator) *Hello
- func (h *Hello) ClusterClock(clock *session.ClusterClock) *Hello
- func (h *Hello) Compressors(compressors []string) *Hello
- func (h *Hello) Deployment(d driver.Deployment) *Hello
- func (h *Hello) Execute(ctx context.Context) error
- func (h *Hello) FinishHandshake(context.Context, *mnet.Connection) error
- func (h *Hello) GetHandshakeInformation(ctx context.Context, _ address.Address, conn *mnet.Connection) (driver.HandshakeInformation, error)
- func (h *Hello) LoadBalanced(lb bool) *Hello
- func (h *Hello) MaxAwaitTimeMS(awaitTime int64) *Hello
- func (h *Hello) OmitMaxTimeMS(val bool) *Hello
- func (h *Hello) OuterLibraryName(name string) *Hello
- func (h *Hello) OuterLibraryPlatform(platform string) *Hello
- func (h *Hello) OuterLibraryVersion(version string) *Hello
- func (h *Hello) Result(addr address.Address) description.Server
- func (h *Hello) SASLSupportedMechs(username string) *Hello
- func (h *Hello) ServerAPI(serverAPI *driver.ServerAPIOptions) *Hello
- func (h *Hello) SpeculativeAuthenticate(doc bsoncore.Document) *Hello
- func (h *Hello) StreamResponse(ctx context.Context, conn *mnet.Connection) error
- func (h *Hello) TopologyVersion(tv *description.TopologyVersion) *Hello
- type Insert
- func (i *Insert) Authenticator(authenticator driver.Authenticator) *Insert
- func (i *Insert) BypassDocumentValidation(bypassDocumentValidation bool) *Insert
- func (i *Insert) ClusterClock(clock *session.ClusterClock) *Insert
- func (i *Insert) Collection(collection string) *Insert
- func (i *Insert) CommandMonitor(monitor *event.CommandMonitor) *Insert
- func (i *Insert) Comment(comment bsoncore.Value) *Insert
- func (i *Insert) Crypt(crypt driver.Crypt) *Insert
- func (i *Insert) Database(database string) *Insert
- func (i *Insert) Deployment(deployment driver.Deployment) *Insert
- func (i *Insert) Documents(documents ...bsoncore.Document) *Insert
- func (i *Insert) Execute(ctx context.Context) error
- func (i *Insert) Logger(logger *logger.Logger) *Insert
- func (i *Insert) Ordered(ordered bool) *Insert
- func (i *Insert) Result() InsertResult
- func (i *Insert) Retry(retry driver.RetryMode) *Insert
- func (i *Insert) ServerAPI(serverAPI *driver.ServerAPIOptions) *Insert
- func (i *Insert) ServerSelector(selector description.ServerSelector) *Insert
- func (i *Insert) Session(session *session.Client) *Insert
- func (i *Insert) Timeout(timeout *time.Duration) *Insert
- func (i *Insert) WriteConcern(writeConcern *writeconcern.WriteConcern) *Insert
- type InsertResult
- type LastErrorObject
- type ListCollections
- func (lc *ListCollections) Authenticator(authenticator driver.Authenticator) *ListCollections
- func (lc *ListCollections) AuthorizedCollections(authorizedCollections bool) *ListCollections
- func (lc *ListCollections) BatchSize(batchSize int32) *ListCollections
- func (lc *ListCollections) ClusterClock(clock *session.ClusterClock) *ListCollections
- func (lc *ListCollections) CommandMonitor(monitor *event.CommandMonitor) *ListCollections
- func (lc *ListCollections) Crypt(crypt driver.Crypt) *ListCollections
- func (lc *ListCollections) Database(database string) *ListCollections
- func (lc *ListCollections) Deployment(deployment driver.Deployment) *ListCollections
- func (lc *ListCollections) Execute(ctx context.Context) error
- func (lc *ListCollections) Filter(filter bsoncore.Document) *ListCollections
- func (lc *ListCollections) NameOnly(nameOnly bool) *ListCollections
- func (lc *ListCollections) ReadPreference(readPreference *readpref.ReadPref) *ListCollections
- func (lc *ListCollections) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
- func (lc *ListCollections) Retry(retry driver.RetryMode) *ListCollections
- func (lc *ListCollections) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListCollections
- func (lc *ListCollections) ServerSelector(selector description.ServerSelector) *ListCollections
- func (lc *ListCollections) Session(session *session.Client) *ListCollections
- func (lc *ListCollections) Timeout(timeout *time.Duration) *ListCollections
- type ListDatabases
- func (ld *ListDatabases) Authenticator(authenticator driver.Authenticator) *ListDatabases
- func (ld *ListDatabases) AuthorizedDatabases(authorizedDatabases bool) *ListDatabases
- func (ld *ListDatabases) ClusterClock(clock *session.ClusterClock) *ListDatabases
- func (ld *ListDatabases) CommandMonitor(monitor *event.CommandMonitor) *ListDatabases
- func (ld *ListDatabases) Crypt(crypt driver.Crypt) *ListDatabases
- func (ld *ListDatabases) Database(database string) *ListDatabases
- func (ld *ListDatabases) Deployment(deployment driver.Deployment) *ListDatabases
- func (ld *ListDatabases) Execute(ctx context.Context) error
- func (ld *ListDatabases) Filter(filter bsoncore.Document) *ListDatabases
- func (ld *ListDatabases) NameOnly(nameOnly bool) *ListDatabases
- func (ld *ListDatabases) ReadPreference(readPreference *readpref.ReadPref) *ListDatabases
- func (ld *ListDatabases) Result() ListDatabasesResult
- func (ld *ListDatabases) Retry(retry driver.RetryMode) *ListDatabases
- func (ld *ListDatabases) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListDatabases
- func (ld *ListDatabases) ServerSelector(selector description.ServerSelector) *ListDatabases
- func (ld *ListDatabases) Session(session *session.Client) *ListDatabases
- func (ld *ListDatabases) Timeout(timeout *time.Duration) *ListDatabases
- type ListDatabasesResult
- type ListIndexes
- func (li *ListIndexes) Authenticator(authenticator driver.Authenticator) *ListIndexes
- func (li *ListIndexes) BatchSize(batchSize int32) *ListIndexes
- func (li *ListIndexes) ClusterClock(clock *session.ClusterClock) *ListIndexes
- func (li *ListIndexes) Collection(collection string) *ListIndexes
- func (li *ListIndexes) CommandMonitor(monitor *event.CommandMonitor) *ListIndexes
- func (li *ListIndexes) Crypt(crypt driver.Crypt) *ListIndexes
- func (li *ListIndexes) Database(database string) *ListIndexes
- func (li *ListIndexes) Deployment(deployment driver.Deployment) *ListIndexes
- func (li *ListIndexes) Execute(ctx context.Context) error
- func (li *ListIndexes) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
- func (li *ListIndexes) Retry(retry driver.RetryMode) *ListIndexes
- func (li *ListIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListIndexes
- func (li *ListIndexes) ServerSelector(selector description.ServerSelector) *ListIndexes
- func (li *ListIndexes) Session(session *session.Client) *ListIndexes
- func (li *ListIndexes) Timeout(timeout *time.Duration) *ListIndexes
- type Update
- func (u *Update) ArrayFilters(arrayFilters bool) *Update
- func (u *Update) Authenticator(authenticator driver.Authenticator) *Update
- func (u *Update) BypassDocumentValidation(bypassDocumentValidation bool) *Update
- func (u *Update) ClusterClock(clock *session.ClusterClock) *Update
- func (u *Update) Collection(collection string) *Update
- func (u *Update) CommandMonitor(monitor *event.CommandMonitor) *Update
- func (u *Update) Comment(comment bsoncore.Value) *Update
- func (u *Update) Crypt(crypt driver.Crypt) *Update
- func (u *Update) Database(database string) *Update
- func (u *Update) Deployment(deployment driver.Deployment) *Update
- func (u *Update) Execute(ctx context.Context) error
- func (u *Update) Hint(hint bool) *Update
- func (u *Update) Let(let bsoncore.Document) *Update
- func (u *Update) Logger(logger *logger.Logger) *Update
- func (u *Update) Ordered(ordered bool) *Update
- func (u *Update) Result() UpdateResult
- func (u *Update) Retry(retry driver.RetryMode) *Update
- func (u *Update) ServerAPI(serverAPI *driver.ServerAPIOptions) *Update
- func (u *Update) ServerSelector(selector description.ServerSelector) *Update
- func (u *Update) Session(session *session.Client) *Update
- func (u *Update) Timeout(timeout *time.Duration) *Update
- func (u *Update) Updates(updates ...bsoncore.Document) *Update
- func (u *Update) WriteConcern(writeConcern *writeconcern.WriteConcern) *Update
- type UpdateResult
- type UpdateSearchIndex
- func (usi *UpdateSearchIndex) Authenticator(authenticator driver.Authenticator) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) ClusterClock(clock *session.ClusterClock) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Collection(collection string) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) CommandMonitor(monitor *event.CommandMonitor) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Crypt(crypt driver.Crypt) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Database(database string) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Definition(definition bsoncore.Document) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Deployment(deployment driver.Deployment) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Execute(ctx context.Context) error
- func (usi *UpdateSearchIndex) Index(name string) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Result() UpdateSearchIndexResult
- func (usi *UpdateSearchIndex) ServerAPI(serverAPI *driver.ServerAPIOptions) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) ServerSelector(selector description.ServerSelector) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Session(session *session.Client) *UpdateSearchIndex
- func (usi *UpdateSearchIndex) Timeout(timeout *time.Duration) *UpdateSearchIndex
- type UpdateSearchIndexResult
- type Upsert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbortTransaction ¶
type AbortTransaction struct {
// contains filtered or unexported fields
}
AbortTransaction performs an abortTransaction operation.
func NewAbortTransaction ¶
func NewAbortTransaction() *AbortTransaction
NewAbortTransaction constructs and returns a new AbortTransaction.
func (*AbortTransaction) Authenticator ¶
func (at *AbortTransaction) Authenticator(authenticator driver.Authenticator) *AbortTransaction
Authenticator sets the authenticator to use for this operation.
func (*AbortTransaction) ClusterClock ¶
func (at *AbortTransaction) ClusterClock(clock *session.ClusterClock) *AbortTransaction
ClusterClock sets the cluster clock for this operation.
func (*AbortTransaction) Collection ¶
func (at *AbortTransaction) Collection(collection string) *AbortTransaction
Collection sets the collection that this command will run against.
func (*AbortTransaction) CommandMonitor ¶
func (at *AbortTransaction) CommandMonitor(monitor *event.CommandMonitor) *AbortTransaction
CommandMonitor sets the monitor to use for APM events.
func (*AbortTransaction) Crypt ¶
func (at *AbortTransaction) Crypt(crypt driver.Crypt) *AbortTransaction
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*AbortTransaction) Database ¶
func (at *AbortTransaction) Database(database string) *AbortTransaction
Database sets the database to run this operation against.
func (*AbortTransaction) Deployment ¶
func (at *AbortTransaction) Deployment(deployment driver.Deployment) *AbortTransaction
Deployment sets the deployment to use for this operation.
func (*AbortTransaction) Execute ¶
func (at *AbortTransaction) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*AbortTransaction) RecoveryToken ¶
func (at *AbortTransaction) RecoveryToken(recoveryToken bsoncore.Document) *AbortTransaction
RecoveryToken sets the recovery token to use when committing or aborting a sharded transaction.
func (*AbortTransaction) Retry ¶
func (at *AbortTransaction) Retry(retry driver.RetryMode) *AbortTransaction
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*AbortTransaction) ServerAPI ¶
func (at *AbortTransaction) ServerAPI(serverAPI *driver.ServerAPIOptions) *AbortTransaction
ServerAPI sets the server API version for this operation.
func (*AbortTransaction) ServerSelector ¶
func (at *AbortTransaction) ServerSelector(selector description.ServerSelector) *AbortTransaction
ServerSelector sets the selector used to retrieve a server.
func (*AbortTransaction) Session ¶
func (at *AbortTransaction) Session(session *session.Client) *AbortTransaction
Session sets the session for this operation.
func (*AbortTransaction) WriteConcern ¶
func (at *AbortTransaction) WriteConcern(writeConcern *writeconcern.WriteConcern) *AbortTransaction
WriteConcern sets the write concern for this operation.
type Aggregate ¶
type Aggregate struct {
// contains filtered or unexported fields
}
Aggregate represents 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) Authenticator ¶
func (a *Aggregate) Authenticator(authenticator driver.Authenticator) *Aggregate
Authenticator sets the authenticator to use for this operation.
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) Crypt ¶
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*Aggregate) CustomOptions ¶
CustomOptions specifies extra options to use in the aggregate command.
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 operation did not execute successfully.
func (*Aggregate) HasOutputStage ¶
HasOutputStage specifies whether the aggregate contains an output stage. Used in determining when to append read preference at the operation level.
func (*Aggregate) Let ¶
Let specifies the let document to use. This option is only valid for server versions 5.0 and above.
func (*Aggregate) OmitMaxTimeMS ¶
OmitMaxTimeMS omits the automatically-calculated "maxTimeMS" from the command.
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 preference 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
ResultCursorResponse returns the underlying CursorResponse result of executing this operation.
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) ServerAPI ¶
func (a *Aggregate) ServerAPI(serverAPI *driver.ServerAPIOptions) *Aggregate
ServerAPI sets the server API version for this operation.
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.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is used to run a generic operation.
func NewCommand ¶
NewCommand constructs and returns a new Command. Once the operation is executed, the result may only be accessed via the Result() function.
func NewCursorCommand ¶
func NewCursorCommand(command bsoncore.Document, cursorOpts driver.CursorOptions) *Command
NewCursorCommand constructs a new Command. Once the operation is executed, the server response will be used to construct a cursor, which can be accessed via the ResultCursor() function.
func (*Command) Authenticator ¶
func (c *Command) Authenticator(authenticator driver.Authenticator) *Command
Authenticator sets the authenticator to use for this operation.
func (*Command) ClusterClock ¶
func (c *Command) ClusterClock(clock *session.ClusterClock) *Command
ClusterClock sets the cluster clock for this operation.
func (*Command) CommandMonitor ¶
func (c *Command) CommandMonitor(monitor *event.CommandMonitor) *Command
CommandMonitor sets the monitor to use for APM events.
func (*Command) Deployment ¶
func (c *Command) Deployment(deployment driver.Deployment) *Command
Deployment sets the deployment to use for this operation.
func (*Command) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Command) ReadPreference ¶
ReadPreference set the read preference used with this operation.
func (*Command) ResultCursor ¶
func (c *Command) ResultCursor() (*driver.BatchCursor, error)
ResultCursor returns the BatchCursor that was constructed using the command response. If the operation was not configured to create a cursor (i.e. it was created using NewCommand rather than NewCursorCommand), this function will return nil and an error.
func (*Command) ServerAPI ¶
func (c *Command) ServerAPI(serverAPI *driver.ServerAPIOptions) *Command
ServerAPI sets the server API version for this operation.
func (*Command) ServerSelector ¶
func (c *Command) ServerSelector(selector description.ServerSelector) *Command
ServerSelector sets the selector used to retrieve a server.
type CommitTransaction ¶
type CommitTransaction struct {
// contains filtered or unexported fields
}
CommitTransaction attempts to commit a transaction.
func NewCommitTransaction ¶
func NewCommitTransaction() *CommitTransaction
NewCommitTransaction constructs and returns a new CommitTransaction.
func (*CommitTransaction) Authenticator ¶
func (ct *CommitTransaction) Authenticator(authenticator driver.Authenticator) *CommitTransaction
Authenticator sets the authenticator to use for this operation.
func (*CommitTransaction) ClusterClock ¶
func (ct *CommitTransaction) ClusterClock(clock *session.ClusterClock) *CommitTransaction
ClusterClock sets the cluster clock for this operation.
func (*CommitTransaction) CommandMonitor ¶
func (ct *CommitTransaction) CommandMonitor(monitor *event.CommandMonitor) *CommitTransaction
CommandMonitor sets the monitor to use for APM events.
func (*CommitTransaction) Crypt ¶
func (ct *CommitTransaction) Crypt(crypt driver.Crypt) *CommitTransaction
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*CommitTransaction) Database ¶
func (ct *CommitTransaction) Database(database string) *CommitTransaction
Database sets the database to run this operation against.
func (*CommitTransaction) Deployment ¶
func (ct *CommitTransaction) Deployment(deployment driver.Deployment) *CommitTransaction
Deployment sets the deployment to use for this operation.
func (*CommitTransaction) Execute ¶
func (ct *CommitTransaction) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*CommitTransaction) RecoveryToken ¶
func (ct *CommitTransaction) RecoveryToken(recoveryToken bsoncore.Document) *CommitTransaction
RecoveryToken sets the recovery token to use when committing or aborting a sharded transaction.
func (*CommitTransaction) Retry ¶
func (ct *CommitTransaction) Retry(retry driver.RetryMode) *CommitTransaction
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*CommitTransaction) ServerAPI ¶
func (ct *CommitTransaction) ServerAPI(serverAPI *driver.ServerAPIOptions) *CommitTransaction
ServerAPI sets the server API version for this operation.
func (*CommitTransaction) ServerSelector ¶
func (ct *CommitTransaction) ServerSelector(selector description.ServerSelector) *CommitTransaction
ServerSelector sets the selector used to retrieve a server.
func (*CommitTransaction) Session ¶
func (ct *CommitTransaction) Session(session *session.Client) *CommitTransaction
Session sets the session for this operation.
func (*CommitTransaction) WriteConcern ¶
func (ct *CommitTransaction) WriteConcern(writeConcern *writeconcern.WriteConcern) *CommitTransaction
WriteConcern sets the write concern for this operation.
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
Count represents a count operation.
func (*Count) Authenticator ¶
func (c *Count) Authenticator(authenticator driver.Authenticator) *Count
Authenticator sets the authenticator to use for this operation.
func (*Count) ClusterClock ¶
func (c *Count) ClusterClock(clock *session.ClusterClock) *Count
ClusterClock sets the cluster clock for this operation.
func (*Count) Collection ¶
Collection sets the collection that this command will run against.
func (*Count) CommandMonitor ¶
func (c *Count) CommandMonitor(monitor *event.CommandMonitor) *Count
CommandMonitor sets the monitor to use for APM events.
func (*Count) Deployment ¶
func (c *Count) Deployment(deployment driver.Deployment) *Count
Deployment sets the deployment to use for this operation.
func (*Count) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Count) ReadConcern ¶
func (c *Count) ReadConcern(readConcern *readconcern.ReadConcern) *Count
ReadConcern specifies the read concern for this operation.
func (*Count) ReadPreference ¶
ReadPreference set the read preference used with this operation.
func (*Count) Result ¶
func (c *Count) Result() CountResult
Result returns the result of executing this operation.
func (*Count) Retry ¶
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*Count) ServerAPI ¶
func (c *Count) ServerAPI(serverAPI *driver.ServerAPIOptions) *Count
ServerAPI sets the server API version for this operation.
func (*Count) ServerSelector ¶
func (c *Count) ServerSelector(selector description.ServerSelector) *Count
ServerSelector sets the selector used to retrieve a server.
type CountResult ¶
type CountResult struct { // The number of documents found N int64 }
CountResult represents a count result returned by the server.
type Create ¶
type Create struct {
// contains filtered or unexported fields
}
Create represents a create operation.
func (*Create) Authenticator ¶
func (c *Create) Authenticator(authenticator driver.Authenticator) *Create
Authenticator sets the authenticator to use for this operation.
func (*Create) ChangeStreamPreAndPostImages ¶
ChangeStreamPreAndPostImages specifies how change streams opened against the collection can return pre- and post-images of updated documents. This option is only valid for server versions 6.0 and above.
func (*Create) ClusterClock ¶
func (c *Create) ClusterClock(clock *session.ClusterClock) *Create
ClusterClock sets the cluster clock for this operation.
func (*Create) ClusteredIndex ¶
ClusteredIndex sets the ClusteredIndex option for this operation.
func (*Create) Collation ¶
Collation specifies a collation. This option is only valid for server versions 3.4 and above.
func (*Create) CollectionName ¶
CollectionName specifies the name of the collection to create.
func (*Create) CommandMonitor ¶
func (c *Create) CommandMonitor(monitor *event.CommandMonitor) *Create
CommandMonitor sets the monitor to use for APM events.
func (*Create) Deployment ¶
func (c *Create) Deployment(deployment driver.Deployment) *Create
Deployment sets the deployment to use for this operation.
func (*Create) EncryptedFields ¶
EncryptedFields sets the EncryptedFields for this operation.
func (*Create) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Create) ExpireAfterSeconds ¶
ExpireAfterSeconds sets the seconds to wait before deleting old time-series data.
func (*Create) IndexOptionDefaults ¶
IndexOptionDefaults specifies a default configuration for indexes on the collection.
func (*Create) Pipeline ¶
Pipeline specifies the agggregtion pipeline to be run against the source to create the view.
func (*Create) ServerAPI ¶
func (c *Create) ServerAPI(serverAPI *driver.ServerAPIOptions) *Create
ServerAPI sets the server API version for this operation.
func (*Create) ServerSelector ¶
func (c *Create) ServerSelector(selector description.ServerSelector) *Create
ServerSelector sets the selector used to retrieve a server.
func (*Create) StorageEngine ¶
StorageEngine specifies the storage engine to use for the index.
func (*Create) TimeSeries ¶
TimeSeries sets the time series options for this operation.
func (*Create) ValidationAction ¶
ValidationAction specifies what should happen if a document being inserted does not pass validation.
func (*Create) ValidationLevel ¶
ValidationLevel specifies how strictly the server applies validation rules to existing documents in the collection during update operations.
func (*Create) ViewOn ¶
ViewOn specifies the name of the source collection or view on which the view will be created.
func (*Create) WriteConcern ¶
func (c *Create) WriteConcern(writeConcern *writeconcern.WriteConcern) *Create
WriteConcern sets the write concern for this operation.
type CreateIndexes ¶
type CreateIndexes struct {
// contains filtered or unexported fields
}
CreateIndexes performs a createIndexes operation.
func NewCreateIndexes ¶
func NewCreateIndexes(indexes bsoncore.Document) *CreateIndexes
NewCreateIndexes constructs and returns a new CreateIndexes.
func (*CreateIndexes) Authenticator ¶
func (ci *CreateIndexes) Authenticator(authenticator driver.Authenticator) *CreateIndexes
Authenticator sets the authenticator to use for this operation.
func (*CreateIndexes) ClusterClock ¶
func (ci *CreateIndexes) ClusterClock(clock *session.ClusterClock) *CreateIndexes
ClusterClock sets the cluster clock for this operation.
func (*CreateIndexes) Collection ¶
func (ci *CreateIndexes) Collection(collection string) *CreateIndexes
Collection sets the collection that this command will run against.
func (*CreateIndexes) CommandMonitor ¶
func (ci *CreateIndexes) CommandMonitor(monitor *event.CommandMonitor) *CreateIndexes
CommandMonitor sets the monitor to use for APM events.
func (*CreateIndexes) CommitQuorum ¶
func (ci *CreateIndexes) CommitQuorum(commitQuorum bsoncore.Value) *CreateIndexes
CommitQuorum specifies the number of data-bearing members of a replica set, including the primary, that must complete the index builds successfully before the primary marks the indexes as ready. This should either be a string or int32 value.
func (*CreateIndexes) Crypt ¶
func (ci *CreateIndexes) Crypt(crypt driver.Crypt) *CreateIndexes
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*CreateIndexes) Database ¶
func (ci *CreateIndexes) Database(database string) *CreateIndexes
Database sets the database to run this operation against.
func (*CreateIndexes) Deployment ¶
func (ci *CreateIndexes) Deployment(deployment driver.Deployment) *CreateIndexes
Deployment sets the deployment to use for this operation.
func (*CreateIndexes) Execute ¶
func (ci *CreateIndexes) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*CreateIndexes) Indexes ¶
func (ci *CreateIndexes) Indexes(indexes bsoncore.Document) *CreateIndexes
Indexes specifies an array containing index specification documents for the indexes being created.
func (*CreateIndexes) Result ¶
func (ci *CreateIndexes) Result() CreateIndexesResult
Result returns the result of executing this operation.
func (*CreateIndexes) ServerAPI ¶
func (ci *CreateIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *CreateIndexes
ServerAPI sets the server API version for this operation.
func (*CreateIndexes) ServerSelector ¶
func (ci *CreateIndexes) ServerSelector(selector description.ServerSelector) *CreateIndexes
ServerSelector sets the selector used to retrieve a server.
func (*CreateIndexes) Session ¶
func (ci *CreateIndexes) Session(session *session.Client) *CreateIndexes
Session sets the session for this operation.
func (*CreateIndexes) Timeout ¶
func (ci *CreateIndexes) Timeout(timeout *time.Duration) *CreateIndexes
Timeout sets the timeout for this operation.
func (*CreateIndexes) WriteConcern ¶
func (ci *CreateIndexes) WriteConcern(writeConcern *writeconcern.WriteConcern) *CreateIndexes
WriteConcern sets the write concern for this operation.
type CreateIndexesResult ¶
type CreateIndexesResult struct { // If the collection was created automatically. CreatedCollectionAutomatically bool // The number of indexes existing after this command. IndexesAfter int32 // The number of indexes existing before this command. IndexesBefore int32 }
CreateIndexesResult represents a createIndexes result returned by the server.
type CreateSearchIndexResult ¶
type CreateSearchIndexResult struct {
Name string
}
CreateSearchIndexResult represents a single search index result in CreateSearchIndexesResult.
type CreateSearchIndexes ¶
type CreateSearchIndexes struct {
// contains filtered or unexported fields
}
CreateSearchIndexes performs a createSearchIndexes operation.
func NewCreateSearchIndexes ¶
func NewCreateSearchIndexes(indexes bsoncore.Document) *CreateSearchIndexes
NewCreateSearchIndexes constructs and returns a new CreateSearchIndexes.
func (*CreateSearchIndexes) Authenticator ¶
func (csi *CreateSearchIndexes) Authenticator(authenticator driver.Authenticator) *CreateSearchIndexes
Authenticator sets the authenticator to use for this operation.
func (*CreateSearchIndexes) ClusterClock ¶
func (csi *CreateSearchIndexes) ClusterClock(clock *session.ClusterClock) *CreateSearchIndexes
ClusterClock sets the cluster clock for this operation.
func (*CreateSearchIndexes) Collection ¶
func (csi *CreateSearchIndexes) Collection(collection string) *CreateSearchIndexes
Collection sets the collection that this command will run against.
func (*CreateSearchIndexes) CommandMonitor ¶
func (csi *CreateSearchIndexes) CommandMonitor(monitor *event.CommandMonitor) *CreateSearchIndexes
CommandMonitor sets the monitor to use for APM events.
func (*CreateSearchIndexes) Crypt ¶
func (csi *CreateSearchIndexes) Crypt(crypt driver.Crypt) *CreateSearchIndexes
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*CreateSearchIndexes) Database ¶
func (csi *CreateSearchIndexes) Database(database string) *CreateSearchIndexes
Database sets the database to run this operation against.
func (*CreateSearchIndexes) Deployment ¶
func (csi *CreateSearchIndexes) Deployment(deployment driver.Deployment) *CreateSearchIndexes
Deployment sets the deployment to use for this operation.
func (*CreateSearchIndexes) Execute ¶
func (csi *CreateSearchIndexes) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*CreateSearchIndexes) Indexes ¶
func (csi *CreateSearchIndexes) Indexes(indexes bsoncore.Document) *CreateSearchIndexes
Indexes specifies an array containing index specification documents for the indexes being created.
func (*CreateSearchIndexes) Result ¶
func (csi *CreateSearchIndexes) Result() CreateSearchIndexesResult
Result returns the result of executing this operation.
func (*CreateSearchIndexes) ServerAPI ¶
func (csi *CreateSearchIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *CreateSearchIndexes
ServerAPI sets the server API version for this operation.
func (*CreateSearchIndexes) ServerSelector ¶
func (csi *CreateSearchIndexes) ServerSelector(selector description.ServerSelector) *CreateSearchIndexes
ServerSelector sets the selector used to retrieve a server.
func (*CreateSearchIndexes) Session ¶
func (csi *CreateSearchIndexes) Session(session *session.Client) *CreateSearchIndexes
Session sets the session for this operation.
func (*CreateSearchIndexes) Timeout ¶
func (csi *CreateSearchIndexes) Timeout(timeout *time.Duration) *CreateSearchIndexes
Timeout sets the timeout for this operation.
type CreateSearchIndexesResult ¶
type CreateSearchIndexesResult struct {
IndexesCreated []CreateSearchIndexResult
}
CreateSearchIndexesResult represents a createSearchIndexes result returned by the server.
type Delete ¶
type Delete struct {
// contains filtered or unexported fields
}
Delete performs a delete operation
func (*Delete) Authenticator ¶
func (d *Delete) Authenticator(authenticator driver.Authenticator) *Delete
Authenticator sets the authenticator to use for this operation.
func (*Delete) ClusterClock ¶
func (d *Delete) ClusterClock(clock *session.ClusterClock) *Delete
ClusterClock sets the cluster clock for this operation.
func (*Delete) Collection ¶
Collection sets the collection that this command will run against.
func (*Delete) CommandMonitor ¶
func (d *Delete) CommandMonitor(monitor *event.CommandMonitor) *Delete
CommandMonitor sets the monitor to use for APM events.
func (*Delete) Deletes ¶
Deletes adds documents to this operation that will be used to determine what documents to delete when this operation is executed. These documents should have the form {q: <query>, limit: <integer limit>, collation: <document>}. The collation field is optional. If limit is 0, there will be no limit on the number of documents deleted.
func (*Delete) Deployment ¶
func (d *Delete) Deployment(deployment driver.Deployment) *Delete
Deployment sets the deployment to use for this operation.
func (*Delete) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Delete) Hint ¶
Hint is a flag to indicate that the update document contains a hint. Hint is only supported by servers >= 4.4. Older servers >= 3.4 will report an error for using the hint option. For servers < 3.4, the driver will return an error if the hint option is used.
func (*Delete) Let ¶
Let specifies the let document to use. This option is only valid for server versions 5.0 and above.
func (*Delete) Ordered ¶
Ordered sets ordered. If true, when a write fails, the operation will return the error, when false write failures do not stop execution of the operation.
func (*Delete) Result ¶
func (d *Delete) Result() DeleteResult
Result returns the result of executing this operation.
func (*Delete) Retry ¶
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*Delete) ServerAPI ¶
func (d *Delete) ServerAPI(serverAPI *driver.ServerAPIOptions) *Delete
ServerAPI sets the server API version for this operation.
func (*Delete) ServerSelector ¶
func (d *Delete) ServerSelector(selector description.ServerSelector) *Delete
ServerSelector sets the selector used to retrieve a server.
func (*Delete) WriteConcern ¶
func (d *Delete) WriteConcern(writeConcern *writeconcern.WriteConcern) *Delete
WriteConcern sets the write concern for this operation.
type DeleteResult ¶
type DeleteResult struct { // Number of documents successfully deleted. N int64 }
DeleteResult represents a delete result returned by the server.
type Distinct ¶
type Distinct struct {
// contains filtered or unexported fields
}
Distinct performs a distinct operation.
func NewDistinct ¶
NewDistinct constructs and returns a new Distinct.
func (*Distinct) Authenticator ¶
func (d *Distinct) Authenticator(authenticator driver.Authenticator) *Distinct
Authenticator sets the authenticator to use for this operation.
func (*Distinct) ClusterClock ¶
func (d *Distinct) ClusterClock(clock *session.ClusterClock) *Distinct
ClusterClock sets the cluster clock for this operation.
func (*Distinct) Collection ¶
Collection sets the collection that this command will run against.
func (*Distinct) CommandMonitor ¶
func (d *Distinct) CommandMonitor(monitor *event.CommandMonitor) *Distinct
CommandMonitor sets the monitor to use for APM events.
func (*Distinct) Crypt ¶
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*Distinct) Deployment ¶
func (d *Distinct) Deployment(deployment driver.Deployment) *Distinct
Deployment sets the deployment to use for this operation.
func (*Distinct) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Distinct) ReadConcern ¶
func (d *Distinct) ReadConcern(readConcern *readconcern.ReadConcern) *Distinct
ReadConcern specifies the read concern for this operation.
func (*Distinct) ReadPreference ¶
ReadPreference set the read preference used with this operation.
func (*Distinct) Result ¶
func (d *Distinct) Result() DistinctResult
Result returns the result of executing this operation.
func (*Distinct) Retry ¶
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*Distinct) ServerAPI ¶
func (d *Distinct) ServerAPI(serverAPI *driver.ServerAPIOptions) *Distinct
ServerAPI sets the server API version for this operation.
func (*Distinct) ServerSelector ¶
func (d *Distinct) ServerSelector(selector description.ServerSelector) *Distinct
ServerSelector sets the selector used to retrieve a server.
type DistinctResult ¶
DistinctResult represents a distinct result returned by the server.
type DropCollection ¶
type DropCollection struct {
// contains filtered or unexported fields
}
DropCollection performs a drop operation.
func NewDropCollection ¶
func NewDropCollection() *DropCollection
NewDropCollection constructs and returns a new DropCollection.
func (*DropCollection) Authenticator ¶
func (dc *DropCollection) Authenticator(authenticator driver.Authenticator) *DropCollection
Authenticator sets the authenticator to use for this operation.
func (*DropCollection) ClusterClock ¶
func (dc *DropCollection) ClusterClock(clock *session.ClusterClock) *DropCollection
ClusterClock sets the cluster clock for this operation.
func (*DropCollection) Collection ¶
func (dc *DropCollection) Collection(collection string) *DropCollection
Collection sets the collection that this command will run against.
func (*DropCollection) CommandMonitor ¶
func (dc *DropCollection) CommandMonitor(monitor *event.CommandMonitor) *DropCollection
CommandMonitor sets the monitor to use for APM events.
func (*DropCollection) Crypt ¶
func (dc *DropCollection) Crypt(crypt driver.Crypt) *DropCollection
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*DropCollection) Database ¶
func (dc *DropCollection) Database(database string) *DropCollection
Database sets the database to run this operation against.
func (*DropCollection) Deployment ¶
func (dc *DropCollection) Deployment(deployment driver.Deployment) *DropCollection
Deployment sets the deployment to use for this operation.
func (*DropCollection) Execute ¶
func (dc *DropCollection) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*DropCollection) Result ¶
func (dc *DropCollection) Result() DropCollectionResult
Result returns the result of executing this operation.
func (*DropCollection) ServerAPI ¶
func (dc *DropCollection) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropCollection
ServerAPI sets the server API version for this operation.
func (*DropCollection) ServerSelector ¶
func (dc *DropCollection) ServerSelector(selector description.ServerSelector) *DropCollection
ServerSelector sets the selector used to retrieve a server.
func (*DropCollection) Session ¶
func (dc *DropCollection) Session(session *session.Client) *DropCollection
Session sets the session for this operation.
func (*DropCollection) Timeout ¶
func (dc *DropCollection) Timeout(timeout *time.Duration) *DropCollection
Timeout sets the timeout for this operation.
func (*DropCollection) WriteConcern ¶
func (dc *DropCollection) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropCollection
WriteConcern sets the write concern for this operation.
type DropCollectionResult ¶
type DropCollectionResult struct { // The number of indexes in the dropped collection. NIndexesWas int32 // The namespace of the dropped collection. Ns string }
DropCollectionResult represents a dropCollection result returned by the server.
type DropDatabase ¶
type DropDatabase struct {
// contains filtered or unexported fields
}
DropDatabase performs a dropDatabase operation
func NewDropDatabase ¶
func NewDropDatabase() *DropDatabase
NewDropDatabase constructs and returns a new DropDatabase.
func (*DropDatabase) Authenticator ¶
func (dd *DropDatabase) Authenticator(authenticator driver.Authenticator) *DropDatabase
Authenticator sets the authenticator to use for this operation.
func (*DropDatabase) ClusterClock ¶
func (dd *DropDatabase) ClusterClock(clock *session.ClusterClock) *DropDatabase
ClusterClock sets the cluster clock for this operation.
func (*DropDatabase) CommandMonitor ¶
func (dd *DropDatabase) CommandMonitor(monitor *event.CommandMonitor) *DropDatabase
CommandMonitor sets the monitor to use for APM events.
func (*DropDatabase) Crypt ¶
func (dd *DropDatabase) Crypt(crypt driver.Crypt) *DropDatabase
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*DropDatabase) Database ¶
func (dd *DropDatabase) Database(database string) *DropDatabase
Database sets the database to run this operation against.
func (*DropDatabase) Deployment ¶
func (dd *DropDatabase) Deployment(deployment driver.Deployment) *DropDatabase
Deployment sets the deployment to use for this operation.
func (*DropDatabase) Execute ¶
func (dd *DropDatabase) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*DropDatabase) ServerAPI ¶
func (dd *DropDatabase) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropDatabase
ServerAPI sets the server API version for this operation.
func (*DropDatabase) ServerSelector ¶
func (dd *DropDatabase) ServerSelector(selector description.ServerSelector) *DropDatabase
ServerSelector sets the selector used to retrieve a server.
func (*DropDatabase) Session ¶
func (dd *DropDatabase) Session(session *session.Client) *DropDatabase
Session sets the session for this operation.
func (*DropDatabase) WriteConcern ¶
func (dd *DropDatabase) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropDatabase
WriteConcern sets the write concern for this operation.
type DropIndexes ¶
type DropIndexes struct {
// contains filtered or unexported fields
}
DropIndexes performs an dropIndexes operation.
func NewDropIndexes ¶
func NewDropIndexes(index any) *DropIndexes
NewDropIndexes constructs and returns a new DropIndexes.
func (*DropIndexes) Authenticator ¶
func (di *DropIndexes) Authenticator(authenticator driver.Authenticator) *DropIndexes
Authenticator sets the authenticator to use for this operation.
func (*DropIndexes) ClusterClock ¶
func (di *DropIndexes) ClusterClock(clock *session.ClusterClock) *DropIndexes
ClusterClock sets the cluster clock for this operation.
func (*DropIndexes) Collection ¶
func (di *DropIndexes) Collection(collection string) *DropIndexes
Collection sets the collection that this command will run against.
func (*DropIndexes) CommandMonitor ¶
func (di *DropIndexes) CommandMonitor(monitor *event.CommandMonitor) *DropIndexes
CommandMonitor sets the monitor to use for APM events.
func (*DropIndexes) Crypt ¶
func (di *DropIndexes) Crypt(crypt driver.Crypt) *DropIndexes
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*DropIndexes) Database ¶
func (di *DropIndexes) Database(database string) *DropIndexes
Database sets the database to run this operation against.
func (*DropIndexes) Deployment ¶
func (di *DropIndexes) Deployment(deployment driver.Deployment) *DropIndexes
Deployment sets the deployment to use for this operation.
func (*DropIndexes) Execute ¶
func (di *DropIndexes) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*DropIndexes) Index ¶
func (di *DropIndexes) Index(index any) *DropIndexes
Index specifies the name of the index to drop. If '*' is specified, all indexes will be dropped.
func (*DropIndexes) Result ¶
func (di *DropIndexes) Result() DropIndexesResult
Result returns the result of executing this operation.
func (*DropIndexes) ServerAPI ¶
func (di *DropIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropIndexes
ServerAPI sets the server API version for this operation.
func (*DropIndexes) ServerSelector ¶
func (di *DropIndexes) ServerSelector(selector description.ServerSelector) *DropIndexes
ServerSelector sets the selector used to retrieve a server.
func (*DropIndexes) Session ¶
func (di *DropIndexes) Session(session *session.Client) *DropIndexes
Session sets the session for this operation.
func (*DropIndexes) Timeout ¶
func (di *DropIndexes) Timeout(timeout *time.Duration) *DropIndexes
Timeout sets the timeout for this operation.
func (*DropIndexes) WriteConcern ¶
func (di *DropIndexes) WriteConcern(writeConcern *writeconcern.WriteConcern) *DropIndexes
WriteConcern sets the write concern for this operation.
type DropIndexesResult ¶
type DropIndexesResult struct { // Number of indexes that existed before the drop was executed. NIndexesWas int32 }
DropIndexesResult represents a dropIndexes result returned by the server.
type DropSearchIndex ¶
type DropSearchIndex struct {
// contains filtered or unexported fields
}
DropSearchIndex performs an dropSearchIndex operation.
func NewDropSearchIndex ¶
func NewDropSearchIndex(index string) *DropSearchIndex
NewDropSearchIndex constructs and returns a new DropSearchIndex.
func (*DropSearchIndex) Authenticator ¶
func (dsi *DropSearchIndex) Authenticator(authenticator driver.Authenticator) *DropSearchIndex
Authenticator sets the authenticator to use for this operation.
func (*DropSearchIndex) ClusterClock ¶
func (dsi *DropSearchIndex) ClusterClock(clock *session.ClusterClock) *DropSearchIndex
ClusterClock sets the cluster clock for this operation.
func (*DropSearchIndex) Collection ¶
func (dsi *DropSearchIndex) Collection(collection string) *DropSearchIndex
Collection sets the collection that this command will run against.
func (*DropSearchIndex) CommandMonitor ¶
func (dsi *DropSearchIndex) CommandMonitor(monitor *event.CommandMonitor) *DropSearchIndex
CommandMonitor sets the monitor to use for APM events.
func (*DropSearchIndex) Crypt ¶
func (dsi *DropSearchIndex) Crypt(crypt driver.Crypt) *DropSearchIndex
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*DropSearchIndex) Database ¶
func (dsi *DropSearchIndex) Database(database string) *DropSearchIndex
Database sets the database to run this operation against.
func (*DropSearchIndex) Deployment ¶
func (dsi *DropSearchIndex) Deployment(deployment driver.Deployment) *DropSearchIndex
Deployment sets the deployment to use for this operation.
func (*DropSearchIndex) Execute ¶
func (dsi *DropSearchIndex) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*DropSearchIndex) Index ¶
func (dsi *DropSearchIndex) Index(index string) *DropSearchIndex
Index specifies the name of the index to drop. If '*' is specified, all indexes will be dropped.
func (*DropSearchIndex) Result ¶
func (dsi *DropSearchIndex) Result() DropSearchIndexResult
Result returns the result of executing this operation.
func (*DropSearchIndex) ServerAPI ¶
func (dsi *DropSearchIndex) ServerAPI(serverAPI *driver.ServerAPIOptions) *DropSearchIndex
ServerAPI sets the server API version for this operation.
func (*DropSearchIndex) ServerSelector ¶
func (dsi *DropSearchIndex) ServerSelector(selector description.ServerSelector) *DropSearchIndex
ServerSelector sets the selector used to retrieve a server.
func (*DropSearchIndex) Session ¶
func (dsi *DropSearchIndex) Session(session *session.Client) *DropSearchIndex
Session sets the session for this operation.
func (*DropSearchIndex) Timeout ¶
func (dsi *DropSearchIndex) Timeout(timeout *time.Duration) *DropSearchIndex
Timeout sets the timeout for this operation.
type DropSearchIndexResult ¶
type DropSearchIndexResult struct {
Ok int32
}
DropSearchIndexResult represents a dropSearchIndex result returned by the server.
type EndSessions ¶
type EndSessions struct {
// contains filtered or unexported fields
}
EndSessions performs an endSessions operation.
func NewEndSessions ¶
func NewEndSessions(sessionIDs bsoncore.Document) *EndSessions
NewEndSessions constructs and returns a new EndSessions.
func (*EndSessions) Authenticator ¶
func (es *EndSessions) Authenticator(authenticator driver.Authenticator) *EndSessions
Authenticator sets the authenticator to use for this operation.
func (*EndSessions) ClusterClock ¶
func (es *EndSessions) ClusterClock(clock *session.ClusterClock) *EndSessions
ClusterClock sets the cluster clock for this operation.
func (*EndSessions) CommandMonitor ¶
func (es *EndSessions) CommandMonitor(monitor *event.CommandMonitor) *EndSessions
CommandMonitor sets the monitor to use for APM events.
func (*EndSessions) Crypt ¶
func (es *EndSessions) Crypt(crypt driver.Crypt) *EndSessions
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*EndSessions) Database ¶
func (es *EndSessions) Database(database string) *EndSessions
Database sets the database to run this operation against.
func (*EndSessions) Deployment ¶
func (es *EndSessions) Deployment(deployment driver.Deployment) *EndSessions
Deployment sets the deployment to use for this operation.
func (*EndSessions) Execute ¶
func (es *EndSessions) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*EndSessions) ServerAPI ¶
func (es *EndSessions) ServerAPI(serverAPI *driver.ServerAPIOptions) *EndSessions
ServerAPI sets the server API version for this operation.
func (*EndSessions) ServerSelector ¶
func (es *EndSessions) ServerSelector(selector description.ServerSelector) *EndSessions
ServerSelector sets the selector used to retrieve a server.
func (*EndSessions) Session ¶
func (es *EndSessions) Session(session *session.Client) *EndSessions
Session sets the session for this operation.
func (*EndSessions) SessionIDs ¶
func (es *EndSessions) SessionIDs(sessionIDs bsoncore.Document) *EndSessions
SessionIDs specifies the sessions to be expired.
type Find ¶
type Find struct {
// contains filtered or unexported fields
}
Find performs a find operation.
func (*Find) AllowDiskUse ¶
AllowDiskUse when true allows temporary data to be written to disk during the find command."
func (*Find) AllowPartialResults ¶
AllowPartialResults when true allows partial results to be returned if some shards are down.
func (*Find) Authenticator ¶
func (f *Find) Authenticator(authenticator driver.Authenticator) *Find
Authenticator sets the authenticator to use for this operation.
func (*Find) AwaitData ¶
AwaitData when true makes a cursor block before returning when no data is available.
func (*Find) ClusterClock ¶
func (f *Find) ClusterClock(clock *session.ClusterClock) *Find
ClusterClock sets the cluster clock for this operation.
func (*Find) Collection ¶
Collection sets the collection that this command will run against.
func (*Find) CommandMonitor ¶
func (f *Find) CommandMonitor(monitor *event.CommandMonitor) *Find
CommandMonitor sets the monitor to use for APM events.
func (*Find) Deployment ¶
func (f *Find) Deployment(deployment driver.Deployment) *Find
Deployment sets the deployment to use for this operation.
func (*Find) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Find) Let ¶
Let specifies the let document to use. This option is only valid for server versions 5.0 and above.
func (*Find) NoCursorTimeout ¶
NoCursorTimeout when true prevents cursor from timing out after an inactivity period.
func (*Find) OmitMaxTimeMS ¶
OmitMaxTimeMS omits the automatically-calculated "maxTimeMS" from the command.
func (*Find) OplogReplay ¶
OplogReplay when true replays a replica set's oplog.
func (*Find) Projection ¶
Projection limits the fields returned for all documents.
func (*Find) ReadConcern ¶
func (f *Find) ReadConcern(readConcern *readconcern.ReadConcern) *Find
ReadConcern specifies the read concern for this operation.
func (*Find) ReadPreference ¶
ReadPreference set the read preference used with this operation.
func (*Find) Result ¶
func (f *Find) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
Result returns the result of executing this operation.
func (*Find) Retry ¶
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*Find) ServerAPI ¶
func (f *Find) ServerAPI(serverAPI *driver.ServerAPIOptions) *Find
ServerAPI sets the server API version for this operation.
func (*Find) ServerSelector ¶
func (f *Find) ServerSelector(selector description.ServerSelector) *Find
ServerSelector sets the selector used to retrieve a server.
func (*Find) ShowRecordID ¶
ShowRecordID when true adds a $recordId field with the record identifier to returned documents.
func (*Find) SingleBatch ¶
SingleBatch specifies whether the results should be returned in a single batch.
func (*Find) Snapshot ¶
Snapshot prevents the cursor from returning a document more than once because of an intervening write operation.
type FindAndModify ¶
type FindAndModify struct {
// contains filtered or unexported fields
}
FindAndModify performs a findAndModify operation.
func NewFindAndModify ¶
func NewFindAndModify(query bsoncore.Document) *FindAndModify
NewFindAndModify constructs and returns a new FindAndModify.
func (*FindAndModify) ArrayFilters ¶
func (fam *FindAndModify) ArrayFilters(arrayFilters bsoncore.Array) *FindAndModify
ArrayFilters specifies an array of filter documents that determines which array elements to modify for an update operation on an array field.
func (*FindAndModify) Authenticator ¶
func (fam *FindAndModify) Authenticator(authenticator driver.Authenticator) *FindAndModify
Authenticator sets the authenticator to use for this operation.
func (*FindAndModify) BypassDocumentValidation ¶
func (fam *FindAndModify) BypassDocumentValidation(bypassDocumentValidation bool) *FindAndModify
BypassDocumentValidation specifies if document validation can be skipped when executing the operation.
func (*FindAndModify) ClusterClock ¶
func (fam *FindAndModify) ClusterClock(clock *session.ClusterClock) *FindAndModify
ClusterClock sets the cluster clock for this operation.
func (*FindAndModify) Collation ¶
func (fam *FindAndModify) Collation(collation bsoncore.Document) *FindAndModify
Collation specifies a collation to be used.
func (*FindAndModify) Collection ¶
func (fam *FindAndModify) Collection(collection string) *FindAndModify
Collection sets the collection that this command will run against.
func (*FindAndModify) CommandMonitor ¶
func (fam *FindAndModify) CommandMonitor(monitor *event.CommandMonitor) *FindAndModify
CommandMonitor sets the monitor to use for APM events.
func (*FindAndModify) Comment ¶
func (fam *FindAndModify) Comment(comment bsoncore.Value) *FindAndModify
Comment sets a value to help trace an operation.
func (*FindAndModify) Crypt ¶
func (fam *FindAndModify) Crypt(crypt driver.Crypt) *FindAndModify
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*FindAndModify) Database ¶
func (fam *FindAndModify) Database(database string) *FindAndModify
Database sets the database to run this operation against.
func (*FindAndModify) Deployment ¶
func (fam *FindAndModify) Deployment(deployment driver.Deployment) *FindAndModify
Deployment sets the deployment to use for this operation.
func (*FindAndModify) Execute ¶
func (fam *FindAndModify) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*FindAndModify) Fields ¶
func (fam *FindAndModify) Fields(fields bsoncore.Document) *FindAndModify
Fields specifies a subset of fields to return.
func (*FindAndModify) Hint ¶
func (fam *FindAndModify) Hint(hint bsoncore.Value) *FindAndModify
Hint specifies the index to use.
func (*FindAndModify) Let ¶
func (fam *FindAndModify) Let(let bsoncore.Document) *FindAndModify
Let specifies the let document to use. This option is only valid for server versions 5.0 and above.
func (*FindAndModify) NewDocument ¶
func (fam *FindAndModify) NewDocument(newDocument bool) *FindAndModify
NewDocument specifies whether to return the modified document or the original. Defaults to false (return original).
func (*FindAndModify) Query ¶
func (fam *FindAndModify) Query(query bsoncore.Document) *FindAndModify
Query specifies the selection criteria for the modification.
func (*FindAndModify) Remove ¶
func (fam *FindAndModify) Remove(remove bool) *FindAndModify
Remove specifies that the matched document should be removed. Defaults to false.
func (*FindAndModify) Result ¶
func (fam *FindAndModify) Result() FindAndModifyResult
Result returns the result of executing this operation.
func (*FindAndModify) Retry ¶
func (fam *FindAndModify) Retry(retry driver.RetryMode) *FindAndModify
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 (*FindAndModify) ServerAPI ¶
func (fam *FindAndModify) ServerAPI(serverAPI *driver.ServerAPIOptions) *FindAndModify
ServerAPI sets the server API version for this operation.
func (*FindAndModify) ServerSelector ¶
func (fam *FindAndModify) ServerSelector(selector description.ServerSelector) *FindAndModify
ServerSelector sets the selector used to retrieve a server.
func (*FindAndModify) Session ¶
func (fam *FindAndModify) Session(session *session.Client) *FindAndModify
Session sets the session for this operation.
func (*FindAndModify) Sort ¶
func (fam *FindAndModify) Sort(sort bsoncore.Document) *FindAndModify
Sort determines which document the operation modifies if the query matches multiple documents.The first document matched by the sort order will be modified.
func (*FindAndModify) Timeout ¶
func (fam *FindAndModify) Timeout(timeout *time.Duration) *FindAndModify
Timeout sets the timeout for this operation.
func (*FindAndModify) Update ¶
func (fam *FindAndModify) Update(update bsoncore.Value) *FindAndModify
Update specifies the update document to perform on the matched document.
func (*FindAndModify) Upsert ¶
func (fam *FindAndModify) Upsert(upsert bool) *FindAndModify
Upsert specifies whether or not to create a new document if no documents match the query when doing an update. Defaults to false.
func (*FindAndModify) WriteConcern ¶
func (fam *FindAndModify) WriteConcern(writeConcern *writeconcern.WriteConcern) *FindAndModify
WriteConcern sets the write concern for this operation.
type FindAndModifyResult ¶
type FindAndModifyResult struct { // Either the old or modified document, depending on the value of the new parameter. Value bsoncore.Document // Contains information about updates and upserts. LastErrorObject LastErrorObject }
FindAndModifyResult represents a findAndModify result returned by the server.
type Hello ¶
type Hello struct {
// contains filtered or unexported fields
}
Hello is used to run the handshake operation.
func (*Hello) AppName ¶
AppName sets the application name in the client metadata sent in this operation.
func (*Hello) Authenticator ¶
func (h *Hello) Authenticator(authenticator driver.Authenticator) *Hello
Authenticator sets the authenticator to use for this operation.
func (*Hello) ClusterClock ¶
func (h *Hello) ClusterClock(clock *session.ClusterClock) *Hello
ClusterClock sets the cluster clock for this operation.
func (*Hello) Compressors ¶
Compressors sets the compressors that can be used.
func (*Hello) Deployment ¶
func (h *Hello) Deployment(d driver.Deployment) *Hello
Deployment sets the Deployment for this operation.
func (*Hello) FinishHandshake ¶
FinishHandshake implements the Handshaker interface. This is a no-op function because a non-authenticated connection does not do anything besides the initial Hello for a handshake.
func (*Hello) GetHandshakeInformation ¶
func (h *Hello) GetHandshakeInformation(ctx context.Context, _ address.Address, conn *mnet.Connection) (driver.HandshakeInformation, error)
GetHandshakeInformation performs the MongoDB handshake for the provided connection and returns the relevant information about the server. This function implements the driver.Handshaker interface.
func (*Hello) LoadBalanced ¶
LoadBalanced specifies whether or not this operation is being sent over a connection to a load balanced cluster.
func (*Hello) MaxAwaitTimeMS ¶
MaxAwaitTimeMS sets the maximum time for the server to wait for topology changes during a heartbeat.
func (*Hello) OmitMaxTimeMS ¶
OmitMaxTimeMS will ensure maxTimMS is not included in the wire message constructed to send a hello request.
func (*Hello) OuterLibraryName ¶
OuterLibraryName specifies the name of the library wrapping the Go Driver.
func (*Hello) OuterLibraryPlatform ¶
OuterLibraryPlatform specifies the platform of the library wrapping the Go Driver.
func (*Hello) OuterLibraryVersion ¶
OuterLibraryVersion specifies the version of the library wrapping the Go Driver.
func (*Hello) Result ¶
func (h *Hello) Result(addr address.Address) description.Server
Result returns the result of executing this operation.
func (*Hello) SASLSupportedMechs ¶
SASLSupportedMechs retrieves the supported SASL mechanism for the given user when this operation is run.
func (*Hello) ServerAPI ¶
func (h *Hello) ServerAPI(serverAPI *driver.ServerAPIOptions) *Hello
ServerAPI sets the server API version for this operation.
func (*Hello) SpeculativeAuthenticate ¶
SpeculativeAuthenticate sets the document to be used for speculative authentication.
func (*Hello) StreamResponse ¶
StreamResponse gets the next streaming Hello response from the server.
func (*Hello) TopologyVersion ¶
func (h *Hello) TopologyVersion(tv *description.TopologyVersion) *Hello
TopologyVersion sets the TopologyVersion to be used for heartbeats.
type Insert ¶
type Insert struct {
// contains filtered or unexported fields
}
Insert performs an insert operation.
func (*Insert) Authenticator ¶
func (i *Insert) Authenticator(authenticator driver.Authenticator) *Insert
Authenticator sets the authenticator to use for this operation.
func (*Insert) BypassDocumentValidation ¶
BypassDocumentValidation allows the operation to opt-out of document level validation. Valid for server versions >= 3.2. For servers < 3.2, this setting is ignored.
func (*Insert) ClusterClock ¶
func (i *Insert) ClusterClock(clock *session.ClusterClock) *Insert
ClusterClock sets the cluster clock for this operation.
func (*Insert) Collection ¶
Collection sets the collection that this command will run against.
func (*Insert) CommandMonitor ¶
func (i *Insert) CommandMonitor(monitor *event.CommandMonitor) *Insert
CommandMonitor sets the monitor to use for APM events.
func (*Insert) Deployment ¶
func (i *Insert) Deployment(deployment driver.Deployment) *Insert
Deployment sets the deployment to use for this operation.
func (*Insert) Documents ¶
Documents adds documents to this operation that will be inserted when this operation is executed.
func (*Insert) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Insert) Ordered ¶
Ordered sets ordered. If true, when a write fails, the operation will return the error, when false write failures do not stop execution of the operation.
func (*Insert) Result ¶
func (i *Insert) Result() InsertResult
Result returns the result of executing this operation.
func (*Insert) Retry ¶
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*Insert) ServerAPI ¶
func (i *Insert) ServerAPI(serverAPI *driver.ServerAPIOptions) *Insert
ServerAPI sets the server API version for this operation.
func (*Insert) ServerSelector ¶
func (i *Insert) ServerSelector(selector description.ServerSelector) *Insert
ServerSelector sets the selector used to retrieve a server.
func (*Insert) WriteConcern ¶
func (i *Insert) WriteConcern(writeConcern *writeconcern.WriteConcern) *Insert
WriteConcern sets the write concern for this operation.
type InsertResult ¶
type InsertResult struct { // Number of documents successfully inserted. N int64 }
InsertResult represents an insert result returned by the server.
type LastErrorObject ¶
type LastErrorObject struct { // True if an update modified an existing document UpdatedExisting bool // Object ID of the upserted document. Upserted interface{} }
LastErrorObject represents information about updates and upserts returned by the server.
type ListCollections ¶
type ListCollections struct {
// contains filtered or unexported fields
}
ListCollections performs a listCollections operation.
func NewListCollections ¶
func NewListCollections(filter bsoncore.Document) *ListCollections
NewListCollections constructs and returns a new ListCollections.
func (*ListCollections) Authenticator ¶
func (lc *ListCollections) Authenticator(authenticator driver.Authenticator) *ListCollections
Authenticator sets the authenticator to use for this operation.
func (*ListCollections) AuthorizedCollections ¶
func (lc *ListCollections) AuthorizedCollections(authorizedCollections bool) *ListCollections
AuthorizedCollections specifies whether to only return collections the user is authorized to use.
func (*ListCollections) BatchSize ¶
func (lc *ListCollections) BatchSize(batchSize int32) *ListCollections
BatchSize specifies the number of documents to return in every batch.
func (*ListCollections) ClusterClock ¶
func (lc *ListCollections) ClusterClock(clock *session.ClusterClock) *ListCollections
ClusterClock sets the cluster clock for this operation.
func (*ListCollections) CommandMonitor ¶
func (lc *ListCollections) CommandMonitor(monitor *event.CommandMonitor) *ListCollections
CommandMonitor sets the monitor to use for APM events.
func (*ListCollections) Crypt ¶
func (lc *ListCollections) Crypt(crypt driver.Crypt) *ListCollections
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*ListCollections) Database ¶
func (lc *ListCollections) Database(database string) *ListCollections
Database sets the database to run this operation against.
func (*ListCollections) Deployment ¶
func (lc *ListCollections) Deployment(deployment driver.Deployment) *ListCollections
Deployment sets the deployment to use for this operation.
func (*ListCollections) Execute ¶
func (lc *ListCollections) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*ListCollections) Filter ¶
func (lc *ListCollections) Filter(filter bsoncore.Document) *ListCollections
Filter determines what results are returned from listCollections.
func (*ListCollections) NameOnly ¶
func (lc *ListCollections) NameOnly(nameOnly bool) *ListCollections
NameOnly specifies whether to only return collection names.
func (*ListCollections) ReadPreference ¶
func (lc *ListCollections) ReadPreference(readPreference *readpref.ReadPref) *ListCollections
ReadPreference set the read preference used with this operation.
func (*ListCollections) Result ¶
func (lc *ListCollections) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
Result returns the result of executing this operation.
func (*ListCollections) Retry ¶
func (lc *ListCollections) Retry(retry driver.RetryMode) *ListCollections
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*ListCollections) ServerAPI ¶
func (lc *ListCollections) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListCollections
ServerAPI sets the server API version for this operation.
func (*ListCollections) ServerSelector ¶
func (lc *ListCollections) ServerSelector(selector description.ServerSelector) *ListCollections
ServerSelector sets the selector used to retrieve a server.
func (*ListCollections) Session ¶
func (lc *ListCollections) Session(session *session.Client) *ListCollections
Session sets the session for this operation.
func (*ListCollections) Timeout ¶
func (lc *ListCollections) Timeout(timeout *time.Duration) *ListCollections
Timeout sets the timeout for this operation.
type ListDatabases ¶
type ListDatabases struct {
// contains filtered or unexported fields
}
ListDatabases performs a listDatabases operation.
func NewListDatabases ¶
func NewListDatabases(filter bsoncore.Document) *ListDatabases
NewListDatabases constructs and returns a new ListDatabases.
func (*ListDatabases) Authenticator ¶
func (ld *ListDatabases) Authenticator(authenticator driver.Authenticator) *ListDatabases
Authenticator sets the authenticator to use for this operation.
func (*ListDatabases) AuthorizedDatabases ¶
func (ld *ListDatabases) AuthorizedDatabases(authorizedDatabases bool) *ListDatabases
AuthorizedDatabases specifies whether to only return databases which the user is authorized to use."
func (*ListDatabases) ClusterClock ¶
func (ld *ListDatabases) ClusterClock(clock *session.ClusterClock) *ListDatabases
ClusterClock sets the cluster clock for this operation.
func (*ListDatabases) CommandMonitor ¶
func (ld *ListDatabases) CommandMonitor(monitor *event.CommandMonitor) *ListDatabases
CommandMonitor sets the monitor to use for APM events.
func (*ListDatabases) Crypt ¶
func (ld *ListDatabases) Crypt(crypt driver.Crypt) *ListDatabases
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*ListDatabases) Database ¶
func (ld *ListDatabases) Database(database string) *ListDatabases
Database sets the database to run this operation against.
func (*ListDatabases) Deployment ¶
func (ld *ListDatabases) Deployment(deployment driver.Deployment) *ListDatabases
Deployment sets the deployment to use for this operation.
func (*ListDatabases) Execute ¶
func (ld *ListDatabases) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*ListDatabases) Filter ¶
func (ld *ListDatabases) Filter(filter bsoncore.Document) *ListDatabases
Filter determines what results are returned from listDatabases.
func (*ListDatabases) NameOnly ¶
func (ld *ListDatabases) NameOnly(nameOnly bool) *ListDatabases
NameOnly specifies whether to only return database names.
func (*ListDatabases) ReadPreference ¶
func (ld *ListDatabases) ReadPreference(readPreference *readpref.ReadPref) *ListDatabases
ReadPreference set the read preference used with this operation.
func (*ListDatabases) Result ¶
func (ld *ListDatabases) Result() ListDatabasesResult
Result returns the result of executing this operation.
func (*ListDatabases) Retry ¶
func (ld *ListDatabases) Retry(retry driver.RetryMode) *ListDatabases
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*ListDatabases) ServerAPI ¶
func (ld *ListDatabases) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListDatabases
ServerAPI sets the server API version for this operation.
func (*ListDatabases) ServerSelector ¶
func (ld *ListDatabases) ServerSelector(selector description.ServerSelector) *ListDatabases
ServerSelector sets the selector used to retrieve a server.
func (*ListDatabases) Session ¶
func (ld *ListDatabases) Session(session *session.Client) *ListDatabases
Session sets the session for this operation.
func (*ListDatabases) Timeout ¶
func (ld *ListDatabases) Timeout(timeout *time.Duration) *ListDatabases
Timeout sets the timeout for this operation.
type ListDatabasesResult ¶
type ListDatabasesResult struct { // An array of documents, one document for each database Databases []databaseRecord // The sum of the size of all the database files on disk in bytes. TotalSize int64 }
ListDatabasesResult represents a listDatabases result returned by the server.
type ListIndexes ¶
type ListIndexes struct {
// contains filtered or unexported fields
}
ListIndexes performs a listIndexes operation.
func NewListIndexes ¶
func NewListIndexes() *ListIndexes
NewListIndexes constructs and returns a new ListIndexes.
func (*ListIndexes) Authenticator ¶
func (li *ListIndexes) Authenticator(authenticator driver.Authenticator) *ListIndexes
Authenticator sets the authenticator to use for this operation.
func (*ListIndexes) BatchSize ¶
func (li *ListIndexes) BatchSize(batchSize int32) *ListIndexes
BatchSize specifies the number of documents to return in every batch.
func (*ListIndexes) ClusterClock ¶
func (li *ListIndexes) ClusterClock(clock *session.ClusterClock) *ListIndexes
ClusterClock sets the cluster clock for this operation.
func (*ListIndexes) Collection ¶
func (li *ListIndexes) Collection(collection string) *ListIndexes
Collection sets the collection that this command will run against.
func (*ListIndexes) CommandMonitor ¶
func (li *ListIndexes) CommandMonitor(monitor *event.CommandMonitor) *ListIndexes
CommandMonitor sets the monitor to use for APM events.
func (*ListIndexes) Crypt ¶
func (li *ListIndexes) Crypt(crypt driver.Crypt) *ListIndexes
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*ListIndexes) Database ¶
func (li *ListIndexes) Database(database string) *ListIndexes
Database sets the database to run this operation against.
func (*ListIndexes) Deployment ¶
func (li *ListIndexes) Deployment(deployment driver.Deployment) *ListIndexes
Deployment sets the deployment to use for this operation.
func (*ListIndexes) Execute ¶
func (li *ListIndexes) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*ListIndexes) Result ¶
func (li *ListIndexes) Result(opts driver.CursorOptions) (*driver.BatchCursor, error)
Result returns the result of executing this operation.
func (*ListIndexes) Retry ¶
func (li *ListIndexes) Retry(retry driver.RetryMode) *ListIndexes
Retry enables retryable mode for this operation. Retries are handled automatically in driver.Operation.Execute based on how the operation is set.
func (*ListIndexes) ServerAPI ¶
func (li *ListIndexes) ServerAPI(serverAPI *driver.ServerAPIOptions) *ListIndexes
ServerAPI sets the server API version for this operation.
func (*ListIndexes) ServerSelector ¶
func (li *ListIndexes) ServerSelector(selector description.ServerSelector) *ListIndexes
ServerSelector sets the selector used to retrieve a server.
func (*ListIndexes) Session ¶
func (li *ListIndexes) Session(session *session.Client) *ListIndexes
Session sets the session for this operation.
func (*ListIndexes) Timeout ¶
func (li *ListIndexes) Timeout(timeout *time.Duration) *ListIndexes
Timeout sets the timeout for this operation.
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
Update performs an update operation.
func (*Update) ArrayFilters ¶
ArrayFilters is a flag to indicate that the update document contains an arrayFilters field. This option is only supported on server versions 3.6 and higher. For servers < 3.6, the driver will return an error.
func (*Update) Authenticator ¶
func (u *Update) Authenticator(authenticator driver.Authenticator) *Update
Authenticator sets the authenticator to use for this operation.
func (*Update) BypassDocumentValidation ¶
BypassDocumentValidation allows the operation to opt-out of document level validation. Valid for server versions >= 3.2. For servers < 3.2, this setting is ignored.
func (*Update) ClusterClock ¶
func (u *Update) ClusterClock(clock *session.ClusterClock) *Update
ClusterClock sets the cluster clock for this operation.
func (*Update) Collection ¶
Collection sets the collection that this command will run against.
func (*Update) CommandMonitor ¶
func (u *Update) CommandMonitor(monitor *event.CommandMonitor) *Update
CommandMonitor sets the monitor to use for APM events.
func (*Update) Deployment ¶
func (u *Update) Deployment(deployment driver.Deployment) *Update
Deployment sets the deployment to use for this operation.
func (*Update) Execute ¶
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*Update) Hint ¶
Hint is a flag to indicate that the update document contains a hint. Hint is only supported by servers >= 4.2. Older servers >= 3.4 will report an error for using the hint option. For servers < 3.4, the driver will return an error if the hint option is used.
func (*Update) Let ¶
Let specifies the let document to use. This option is only valid for server versions 5.0 and above.
func (*Update) Ordered ¶
Ordered sets ordered. If true, when a write fails, the operation will return the error, when false write failures do not stop execution of the operation.
func (*Update) Result ¶
func (u *Update) Result() UpdateResult
Result returns the result of executing this operation.
func (*Update) 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 (*Update) ServerAPI ¶
func (u *Update) ServerAPI(serverAPI *driver.ServerAPIOptions) *Update
ServerAPI sets the server API version for this operation.
func (*Update) ServerSelector ¶
func (u *Update) ServerSelector(selector description.ServerSelector) *Update
ServerSelector sets the selector used to retrieve a server.
func (*Update) Updates ¶
Updates specifies an array of update statements to perform when this operation is executed. Each update document must have the following structure: {q: <query>, u: <update>, multi: <boolean>, collation: Optional<Document>, arrayFitlers: Optional<Array>, hint: Optional<string/Document>}.
func (*Update) WriteConcern ¶
func (u *Update) WriteConcern(writeConcern *writeconcern.WriteConcern) *Update
WriteConcern sets the write concern for this operation.
type UpdateResult ¶
type UpdateResult struct { // Number of documents matched. N int64 // Number of documents modified. NModified int64 // Information about upserted documents. Upserted []Upsert }
UpdateResult contains information for the result of an Update operation.
type UpdateSearchIndex ¶
type UpdateSearchIndex struct {
// contains filtered or unexported fields
}
UpdateSearchIndex performs a updateSearchIndex operation.
func NewUpdateSearchIndex ¶
func NewUpdateSearchIndex(index string, definition bsoncore.Document) *UpdateSearchIndex
NewUpdateSearchIndex constructs and returns a new UpdateSearchIndex.
func (*UpdateSearchIndex) Authenticator ¶
func (usi *UpdateSearchIndex) Authenticator(authenticator driver.Authenticator) *UpdateSearchIndex
Authenticator sets the authenticator to use for this operation.
func (*UpdateSearchIndex) ClusterClock ¶
func (usi *UpdateSearchIndex) ClusterClock(clock *session.ClusterClock) *UpdateSearchIndex
ClusterClock sets the cluster clock for this operation.
func (*UpdateSearchIndex) Collection ¶
func (usi *UpdateSearchIndex) Collection(collection string) *UpdateSearchIndex
Collection sets the collection that this command will run against.
func (*UpdateSearchIndex) CommandMonitor ¶
func (usi *UpdateSearchIndex) CommandMonitor(monitor *event.CommandMonitor) *UpdateSearchIndex
CommandMonitor sets the monitor to use for APM events.
func (*UpdateSearchIndex) Crypt ¶
func (usi *UpdateSearchIndex) Crypt(crypt driver.Crypt) *UpdateSearchIndex
Crypt sets the Crypt object to use for automatic encryption and decryption.
func (*UpdateSearchIndex) Database ¶
func (usi *UpdateSearchIndex) Database(database string) *UpdateSearchIndex
Database sets the database to run this operation against.
func (*UpdateSearchIndex) Definition ¶
func (usi *UpdateSearchIndex) Definition(definition bsoncore.Document) *UpdateSearchIndex
Definition specifies the definition for the document being created.
func (*UpdateSearchIndex) Deployment ¶
func (usi *UpdateSearchIndex) Deployment(deployment driver.Deployment) *UpdateSearchIndex
Deployment sets the deployment to use for this operation.
func (*UpdateSearchIndex) Execute ¶
func (usi *UpdateSearchIndex) Execute(ctx context.Context) error
Execute runs this operations and returns an error if the operation did not execute successfully.
func (*UpdateSearchIndex) Index ¶
func (usi *UpdateSearchIndex) Index(name string) *UpdateSearchIndex
Index specifies the index of the document being updated.
func (*UpdateSearchIndex) Result ¶
func (usi *UpdateSearchIndex) Result() UpdateSearchIndexResult
Result returns the result of executing this operation.
func (*UpdateSearchIndex) ServerAPI ¶
func (usi *UpdateSearchIndex) ServerAPI(serverAPI *driver.ServerAPIOptions) *UpdateSearchIndex
ServerAPI sets the server API version for this operation.
func (*UpdateSearchIndex) ServerSelector ¶
func (usi *UpdateSearchIndex) ServerSelector(selector description.ServerSelector) *UpdateSearchIndex
ServerSelector sets the selector used to retrieve a server.
func (*UpdateSearchIndex) Session ¶
func (usi *UpdateSearchIndex) Session(session *session.Client) *UpdateSearchIndex
Session sets the session for this operation.
func (*UpdateSearchIndex) Timeout ¶
func (usi *UpdateSearchIndex) Timeout(timeout *time.Duration) *UpdateSearchIndex
Timeout sets the timeout for this operation.
type UpdateSearchIndexResult ¶
type UpdateSearchIndexResult struct {
Ok int32
}
UpdateSearchIndexResult represents a single index in the updateSearchIndexResult result.
Source Files ¶
- abort_transaction.go
- aggregate.go
- command.go
- commit_transaction.go
- count.go
- create.go
- create_indexes.go
- create_search_indexes.go
- delete.go
- distinct.go
- doc.go
- drop_collection.go
- drop_database.go
- drop_indexes.go
- drop_search_index.go
- end_sessions.go
- errors.go
- find.go
- find_and_modify.go
- hello.go
- insert.go
- listDatabases.go
- list_collections.go
- list_indexes.go
- update.go
- update_search_index.go