Documentation
¶
Index ¶
- Variables
- func SetUpMongoConnection()
- type Counter
- type MongoClient
- func (m *MongoClient) Aggregate(collectionName string, pipeline mongo.Pipeline, opts options.AggregateOptions) (*mongo.Cursor, error)
- func (m *MongoClient) Count(collectionName string, filter interface{}) (int64, error)
- func (m *MongoClient) FindOneAndUpdate(collectionName string, updateCriteria interface{}, updateData interface{}, ...) (*mongo.SingleResult, error)
- func (m *MongoClient) IDGeneratorFromCounterWithPrefix(counterId string, prefix string) (string, error)
- func (m *MongoClient) Insert(collectionName string, data interface{}) (string, error)
- func (m *MongoClient) InsertMany(collectionName string, data []interface{}) ([]interface{}, error)
- func (m *MongoClient) Query(collectionName string, query interface{}, options *options.FindOptions) (*mongo.Cursor, error)
- func (m *MongoClient) QueryDistinct(collectionName string, query interface{}, fieldName string) (interface{}, error)
- func (m *MongoClient) QueryOne(collectionName string, query interface{}, options *options.FindOneOptions) (*mongo.SingleResult, error)
- func (m *MongoClient) QueryWithSelect(collectionName string, query interface{}, selectParm interface{}) (*mongo.Cursor, error)
- func (m *MongoClient) Remove(collectionName string, updateCriteria bson.M, opt *options.DeleteOptions) (int64, error)
- func (m *MongoClient) Update(collectionName string, updateCriteria bson.M, updateData interface{}, ...) (int64, error)
- func (m *MongoClient) UpdateOne(collectionName string, updateCriteria bson.M, updateData interface{}) (int64, error)
- type MongoMetaData
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalTnxSection bool
Functions ¶
func SetUpMongoConnection ¶
func SetUpMongoConnection()
Types ¶
type MongoClient ¶
type MongoClient struct {
// contains filtered or unexported fields
}
func UseMongoDb ¶
func UseMongoDb() *MongoClient
func (*MongoClient) Aggregate ¶
func (m *MongoClient) Aggregate(collectionName string, pipeline mongo.Pipeline, opts options.AggregateOptions) (*mongo.Cursor, error)
func (*MongoClient) Count ¶
func (m *MongoClient) Count(collectionName string, filter interface{}) (int64, error)
func (*MongoClient) FindOneAndUpdate ¶
func (m *MongoClient) FindOneAndUpdate(collectionName string, updateCriteria interface{}, updateData interface{}, opt *options.FindOneAndUpdateOptions) (*mongo.SingleResult, error)
func (*MongoClient) IDGeneratorFromCounterWithPrefix ¶
func (m *MongoClient) IDGeneratorFromCounterWithPrefix(counterId string, prefix string) (string, error)
func (*MongoClient) Insert ¶
func (m *MongoClient) Insert(collectionName string, data interface{}) (string, error)
func (*MongoClient) InsertMany ¶
func (m *MongoClient) InsertMany(collectionName string, data []interface{}) ([]interface{}, error)
func (*MongoClient) Query ¶
func (m *MongoClient) Query(collectionName string, query interface{}, options *options.FindOptions) (*mongo.Cursor, error)
func (*MongoClient) QueryDistinct ¶
func (m *MongoClient) QueryDistinct(collectionName string, query interface{}, fieldName string) (interface{}, error)
func (*MongoClient) QueryOne ¶
func (m *MongoClient) QueryOne(collectionName string, query interface{}, options *options.FindOneOptions) (*mongo.SingleResult, error)
func (*MongoClient) QueryWithSelect ¶
func (m *MongoClient) QueryWithSelect(collectionName string, query interface{}, selectParm interface{}) (*mongo.Cursor, error)
func (*MongoClient) Remove ¶
func (m *MongoClient) Remove(collectionName string, updateCriteria bson.M, opt *options.DeleteOptions) (int64, error)
func (*MongoClient) Update ¶
func (m *MongoClient) Update(collectionName string, updateCriteria bson.M, updateData interface{}, opt *options.UpdateOptions) (int64, error)
type MongoMetaData ¶
Click to show internal directories.
Click to hide internal directories.