Documentation ¶
Index ¶
- Variables
- func BsonToModel(b bson.M, m Model) error
- func BuildIndexes(ctx context.Context) error
- func Connect(ctx context.Context) error
- func Count(ctx context.Context, m Model, filter bson.M) (int64, error)
- func DeleteMany(ctx context.Context, m Model, filter bson.M) (*mongo.DeleteResult, error)
- func DeleteOne(ctx context.Context, m Model, filter bson.M) error
- func Disconnect(ctx context.Context) error
- func ExtendBson(dst bson.M, src bson.M)
- func Find(ctx context.Context, m Model, filter bson.M, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func FindByID(ctx context.Context, m Model, mid interface{}) error
- func FindOne(ctx context.Context, m Model, filter bson.M) error
- func Init(usr, pwd string) error
- func InsertOne(ctx context.Context, m Model) error
- func ModelToBson(m Model) (bson.M, error)
- func RegisterModelFactoryFunc(modelFunc modelFactoryFunc)
- func RunInTransaction(ctx context.Context, runOps func(mongo.SessionContext, func() error) error) error
- func UpdateMany(ctx context.Context, m Model, filter bson.M, updates Updates, ...) (*mongo.UpdateResult, error)
- func UpdateOne(ctx context.Context, m Model, updates Updates, opts ...*options.UpdateOptions) error
- type Client
- type Index
- type IndexOpts
- type Model
- type PolymorphicModel
- type QueryIter
- type Updates
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BuildIndexes ¶
func DeleteMany ¶
func Disconnect ¶
func RegisterModelFactoryFunc ¶
func RegisterModelFactoryFunc(modelFunc modelFactoryFunc)
func RunInTransaction ¶
func UpdateMany ¶
Types ¶
type PolymorphicModel ¶
Click to show internal directories.
Click to hide internal directories.