You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/utils/dorm/mongo_get.go

19 lines
327 B

2 years ago
package dorm
import "go.mongodb.org/mongo-driver/mongo"
2 years ago
// GetDb 获取驱动
2 years ago
func (c *MongoClient) GetDb() *mongo.Client {
return c.Db
}
2 years ago
// 获取库名
2 years ago
func (c *MongoClient) getDatabaseName() string {
2 years ago
return c.databaseName
2 years ago
}
2 years ago
// 获取表名
2 years ago
func (c *MongoClient) getCollectionName() string {
return c.collectionName
}