Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoesCollectionExist ¶
DoesCollectionExist checks if a collection exists in the MongoDB database.
Parameters: - client: The MongoDB client. - collectionName: The name of the collection to check.
Returns: - bool: true if the collection exists, false otherwise.
func DoesTableExist ¶
DoesTableExist checks if a table exists in the database.
Parameters: - db: a pointer to a gorm.DB object representing the database connection. - tableName: a string representing the name of the table to check.
Returns: - a boolean value indicating whether the table exists or not.
func GetDbName ¶
func GetDbName() string
GetDbName returns the name of the MongoDB database.
It does not take any parameters. It returns a string representing the name of the database.
func MigrateMongo ¶
MigrateMongo migrates the MongoDB collections and creates necessary indexes.
It takes a *mongo.Client as a parameter. It returns an error if any error occurred during the migration process.
func MigrateSql ¶
MigrateSql migrates the SQL tables.
db: the gorm.DB connection. Returns: an error if there was a problem during migration.
Types ¶
This section is empty.