Versions in this module Expand all Collapse all v1 v1.0.1 Mar 12, 2020 Changes in this version + func CountDocuments(sqltable core.SqlTable, filter interface{}, opts ...*options.CountOptions) (int64, error) + func DeleteMany(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + func DeleteOne(sqltable core.SqlTable, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + func Find(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error) + func FindOne(sqltable core.SqlTable, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult + func FindOneAndDelete(sqltable core.SqlTable, filter interface{}, ...) *mongo.SingleResult + func FindOneAndUpdate(sqltable core.SqlTable, filter interface{}, update interface{}, ...) *mongo.SingleResult + func GetService() core.IService + func InsertMany(sqltable core.SqlTable, data []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error) + func InsertOne(sqltable core.SqlTable, data interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) + func OnInit(s core.IService, opt ...Option) (err error) + func UpdateMany(sqltable core.SqlTable, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + func UpdateOne(sqltable core.SqlTable, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + type Mongodb struct + Client *mongo.Client + Database *mongo.Database + func (this *Mongodb) Collection(sqltable core.SqlTable) *mongo.Collection + type Option func(*Options) + func MaxPoolSize(v uint64) Option + func MongodbDatabase(v string) Option + func MongodbUrl(v string) Option + func TimeOut(v time.Duration) Option + type Options struct + MaxPoolSize uint64 + MongodbDatabase string + MongodbUrl string + TimeOut time.Duration