Documentation ¶
Index ¶
- type Database
- func (database *Database) CustomAggregate(databaseName string, collectionName string, filter []bson.M) (*mongo.Cursor, error)
- func (database *Database) DeleteMany(databaseName string, collectionName string, filter interface{}) (interface{}, error)
- func (database *Database) DeleteOne(databaseName string, collectionName string, filter interface{}) (interface{}, error)
- func (database *Database) Distinct(databaseName string, collectionName string, fieldName string, ...) ([]interface{}, error)
- func (database *Database) DocumentsCount(databaseName string, collectionName string, filter interface{}) (int64, error)
- func (database *Database) Find(databaseName string, collectionName string, filter interface{}, ...) (*mongo.Cursor, error)
- func (database *Database) FindFirst(databaseName string, collectionName string, filter interface{}) (*mongo.Cursor, error)
- func (database *Database) FindLast(databaseName string, collectionName string, filter interface{}) (*mongo.Cursor, error)
- func (database *Database) FindOne(databaseName string, collectionName string, filter interface{}, ...) (*mongo.SingleResult, error)
- func (database *Database) FindPaginated(databaseName string, collectionName string, filter interface{}, ...) (*mongo.Cursor, error)
- func (database *Database) FindSorted(databaseName string, collectionName string, filter interface{}, ...) (*mongo.Cursor, error)
- func (database *Database) GetContext() context.Context
- func (database *Database) GetNextSequenceValue(databaseName string, collectionName string, sequenceName string) (*mongo.UpdateResult, error)
- func (database *Database) InsertMany(databaseName string, collectionName string, data []interface{}) (*mongo.InsertManyResult, error)
- func (database *Database) InsertOne(databaseName string, collectioName string, data interface{}) (*mongo.InsertOneResult, error)
- func (database *Database) IsConnected() bool
- func (database *Database) UpdateMany(databaseName string, collectioName string, filter interface{}, ...) (interface{}, error)
- func (database *Database) UpdateOne(databaseName string, collectioName string, filter interface{}, ...) (*mongo.UpdateResult, error)
- func (database *Database) UpdateOneWithUpsert(databaseName string, collectionName string, filter interface{}, ...) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabaseConnection ¶
func (*Database) CustomAggregate ¶
func (*Database) DeleteMany ¶
func (*Database) DocumentsCount ¶
func (*Database) FindPaginated ¶
func (*Database) FindSorted ¶
func (*Database) GetContext ¶
func (*Database) GetNextSequenceValue ¶
func (*Database) InsertMany ¶
func (*Database) IsConnected ¶
func (*Database) UpdateMany ¶
func (*Database) UpdateOneWithUpsert ¶
Click to show internal directories.
Click to hide internal directories.