Skip to content

Commit

Permalink
feat(Database): Added getMongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeV220 committed Feb 13, 2023
1 parent 6be18a4 commit b632ef9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class DatabaseWrapper {

private Database database;

private MongoDB mongoDB;

private @Nullable MongoClient mongoClient = null;
private @Nullable MongoDatabase mongoDatabase = null;

Expand Down Expand Up @@ -85,7 +87,7 @@ public DatabaseWrapper connect() {
}

case MONGO -> {
MongoDB mongoDB = new MongoDB(data[0], Integer.parseInt(data[1]), data[2], data[3], data[4]);
mongoDB = new MongoDB(data[0], Integer.parseInt(data[1]), data[2], data[3], data[4]);
mongoClient = mongoDB.getMongoClient();
mongoDatabase = mongoDB.getMongoDatabase();
}
Expand Down Expand Up @@ -343,6 +345,10 @@ public Database getSQLDatabase() {
return database;
}

public MongoDB getMongoDB() {
return mongoDB;
}

/**
* Returns a MongoDB collection.
*
Expand Down

0 comments on commit b632ef9

Please sign in to comment.