Documentation ¶
Index ¶
- type Collection
- func (c *Collection) Aggregate(pipeline interface{}, opts ...*options.AggregateOptions) (*Cursor, error)
- func (c *Collection) BulkWrite(models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
- func (c *Collection) Clone(opts ...*options.CollectionOptions) (*Collection, error)
- func (c *Collection) CountDocuments(filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (c *Collection) DeleteMany(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (c *Collection) DeleteOne(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (c *Collection) Distinct(fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
- func (c *Collection) Drop() error
- func (c *Collection) EstimatedDocumentCount(opts ...*options.EstimatedDocumentCountOptions) (int64, error)
- func (c *Collection) Find(filter interface{}, opts ...*options.FindOptions) (*Cursor, error)
- func (c *Collection) FindOne(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (c *Collection) FindOneAndDelete(filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult
- func (c *Collection) FindOneAndReplace(filter, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult
- func (c *Collection) FindOneAndUpdate(filter, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
- func (c *Collection) InsertMany(document []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
- func (c *Collection) InsertOne(document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (c *Collection) Orig() *mongo.Collection
- func (c *Collection) ReplaceOne(filter, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
- func (c *Collection) UpdateMany(filter, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
- func (c *Collection) UpdateOne(filter, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
- func (c *Collection) Upsert(filter, update interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
- func (c *Collection) Watch(pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
- type Cursor
- type Mgo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func (*Collection) Aggregate ¶
func (c *Collection) Aggregate(pipeline interface{}, opts ...*options.AggregateOptions) (*Cursor, error)
func (*Collection) BulkWrite ¶
func (c *Collection) BulkWrite(models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
func (*Collection) Clone ¶
func (c *Collection) Clone(opts ...*options.CollectionOptions) (*Collection, error)
func (*Collection) CountDocuments ¶
func (c *Collection) CountDocuments(filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*Collection) DeleteMany ¶
func (c *Collection) DeleteMany(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*Collection) DeleteOne ¶
func (c *Collection) DeleteOne(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*Collection) Distinct ¶
func (c *Collection) Distinct(fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
func (*Collection) Drop ¶
func (c *Collection) Drop() error
func (*Collection) EstimatedDocumentCount ¶
func (c *Collection) EstimatedDocumentCount(opts ...*options.EstimatedDocumentCountOptions) (int64, error)
func (*Collection) Find ¶
func (c *Collection) Find(filter interface{}, opts ...*options.FindOptions) (*Cursor, error)
func (*Collection) FindOne ¶
func (c *Collection) FindOne(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func (*Collection) FindOneAndDelete ¶
func (c *Collection) FindOneAndDelete(filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult
func (*Collection) FindOneAndReplace ¶
func (c *Collection) FindOneAndReplace(filter, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult
func (*Collection) FindOneAndUpdate ¶
func (c *Collection) FindOneAndUpdate(filter, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
func (*Collection) InsertMany ¶
func (c *Collection) InsertMany(document []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func (*Collection) InsertOne ¶
func (c *Collection) InsertOne(document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
collection
func (*Collection) Orig ¶
func (c *Collection) Orig() *mongo.Collection
func (*Collection) ReplaceOne ¶
func (c *Collection) ReplaceOne(filter, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
func (*Collection) UpdateMany ¶
func (c *Collection) UpdateMany(filter, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*Collection) UpdateOne ¶
func (c *Collection) UpdateOne(filter, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*Collection) Upsert ¶
func (c *Collection) Upsert(filter, update interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
func (*Collection) Watch ¶
func (c *Collection) Watch(pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
Click to show internal directories.
Click to hide internal directories.