Documentation
¶
Index ¶
- func Build(opts ...Option) error
- type ConnInfo
- type LCollection
- func (c *LCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
- func (c *LCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error)
- func (c *LCollection) Count(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (c *LCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (c *LCollection) CreateIndexes(ctx context.Context, indexmodels []mongo.IndexModel, ...) ([]string, error)
- func (c *LCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (c *LCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (c *LCollection) DeleteOneIndex(ctx context.Context, indexname string, opts ...*options.DropIndexesOptions) (bson.Raw, error)
- func (c *LCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (c *LCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (c *LCollection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, ...) *mongo.SingleResult
- func (c *LCollection) IndexList(ctx context.Context, opts ...*options.ListIndexesOptions) (*mongo.Cursor, error)
- func (c *LCollection) InsertMany(ctx context.Context, document []interface{}) (*mongo.InsertManyResult, error)
- func (c *LCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (c *LCollection) ReplaceOne(ctx context.Context, filter interface{}, document interface{}, ...) (*mongo.UpdateResult, error)
- func (c *LCollection) SetTTL(ctx context.Context, indexmodel mongo.IndexModel, ...) (string, error)
- func (c *LCollection) UpdateOne(ctx context.Context, filter interface{}, document interface{}, ...) (*mongo.UpdateResult, error)
- type Option
- type Parm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LCollection ¶
type LCollection struct {
// contains filtered or unexported fields
}
func Collection ¶
func Collection(db string, collection string) *LCollection
func (*LCollection) Aggregate ¶
func (c *LCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
func (*LCollection) BulkWrite ¶
func (c *LCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
func (*LCollection) Count ¶
func (c *LCollection) Count(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*LCollection) CountDocuments ¶
func (c *LCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*LCollection) CreateIndexes ¶
func (c *LCollection) CreateIndexes(ctx context.Context, indexmodels []mongo.IndexModel, opts ...*options.CreateIndexesOptions) ([]string, error)
func (*LCollection) DeleteMany ¶
func (c *LCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*LCollection) DeleteOne ¶
func (c *LCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*LCollection) DeleteOneIndex ¶
func (c *LCollection) DeleteOneIndex(ctx context.Context, indexname string, opts ...*options.DropIndexesOptions) (bson.Raw, error)
func (*LCollection) Find ¶
func (c *LCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
func (*LCollection) FindOne ¶
func (c *LCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func (*LCollection) FindOneAndUpdate ¶
func (c *LCollection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
func (*LCollection) IndexList ¶
func (c *LCollection) IndexList(ctx context.Context, opts ...*options.ListIndexesOptions) (*mongo.Cursor, error)
func (*LCollection) InsertMany ¶
func (c *LCollection) InsertMany(ctx context.Context, document []interface{}) (*mongo.InsertManyResult, error)
func (*LCollection) InsertOne ¶
func (c *LCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*LCollection) ReplaceOne ¶
func (c *LCollection) ReplaceOne(ctx context.Context, filter interface{}, document interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
func (*LCollection) SetTTL ¶
func (c *LCollection) SetTTL(ctx context.Context, indexmodel mongo.IndexModel, opts ...*options.CreateIndexesOptions) (string, error)
func (*LCollection) UpdateOne ¶
func (c *LCollection) UpdateOne(ctx context.Context, filter interface{}, document interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
type Option ¶
type Option func(*Parm)
Option config wraps
func AppendConn ¶
func WithConnPoolSize ¶
func WithConnTimeout ¶
func WithTracer ¶
Click to show internal directories.
Click to hide internal directories.