Versions in this module Expand all Collapse all v1 v1.0.11 Mar 3, 2023 Changes in this version + const Age + const ID + const Mtime + const Name + const Sex + func Collection(db *mongo.Database) *mongo.Collection + type DeleteBuilder struct + func Delete(col *mongo.Collection) *DeleteBuilder + func (d *DeleteBuilder) ByID(ctx context.Context, a primitive.ObjectID) (int64, error) + type FinderBuilder struct + func Find(col *mongo.Collection) *FinderBuilder + func (f *FinderBuilder) All(ctx context.Context) ([]*User, error) + func (f *FinderBuilder) Filter(filter ...primitive.E) *FinderBuilder + func (f *FinderBuilder) Limit(l int64) *FinderBuilder + func (f *FinderBuilder) One(ctx context.Context) (*User, error) + func (f *FinderBuilder) Skip(s int64) *FinderBuilder + func (f *FinderBuilder) Sort(field string, desc bool) *FinderBuilder + type InsertBuilder struct + func Create(col *mongo.Collection) *InsertBuilder + func (i *InsertBuilder) Save(ctx context.Context) error + func (i *InsertBuilder) SetUsers(u ...*User) *InsertBuilder + type UpdateBuilder struct + func Update(col *mongo.Collection) *UpdateBuilder + func (u *UpdateBuilder) ByID(ctx context.Context, a primitive.ObjectID) (int64, error) + func (u *UpdateBuilder) SetAge(a int) *UpdateBuilder + func (u *UpdateBuilder) SetID(a primitive.ObjectID) *UpdateBuilder + func (u *UpdateBuilder) SetMtime(a time.Time) *UpdateBuilder + func (u *UpdateBuilder) SetName(a string) *UpdateBuilder + func (u *UpdateBuilder) SetSex(a bool) *UpdateBuilder + type User struct + Age int + ID primitive.ObjectID + Mtime time.Time + Name string + Sex bool