-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimized for mongodb & added mongodb basics
- Loading branch information
Showing
15 changed files
with
81 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/Delete.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/Insert.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/Select.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/Update.java
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/sql/Delete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package de.eztxm.luckprefix.database.sql; | ||
|
||
public class Delete { | ||
} |
4 changes: 4 additions & 0 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/sql/Insert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package de.eztxm.luckprefix.database.sql; | ||
|
||
public class Insert { | ||
} |
4 changes: 4 additions & 0 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/sql/Select.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package de.eztxm.luckprefix.database.sql; | ||
|
||
public class Select { | ||
} |
2 changes: 1 addition & 1 deletion
2
...a/de/eztxm/luckprefix/database/Table.java → .../eztxm/luckprefix/database/sql/Table.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package de.eztxm.luckprefix.database; | ||
package de.eztxm.luckprefix.database.sql; | ||
|
||
import lombok.Getter; | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
luckprefix-modern/src/main/java/de/eztxm/luckprefix/database/sql/Update.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package de.eztxm.luckprefix.database.sql; | ||
|
||
public class Update { | ||
} |
25 changes: 25 additions & 0 deletions
25
luckprefix-modern/src/main/java/de/eztxm/luckprefix/util/MongoDBManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package de.eztxm.luckprefix.util; | ||
|
||
import de.eztxm.database.MongoDBConnection; | ||
import de.eztxm.luckprefix.LuckPrefix; | ||
import de.eztxm.luckprefix.util.database.MongoDBProcessor; | ||
import org.bukkit.configuration.file.FileConfiguration; | ||
|
||
public class MongoDBManager { | ||
private final MongoDBProcessor processor; | ||
|
||
public MongoDBManager(MongoDBConnection connection) { | ||
this.processor = new MongoDBProcessor(connection); | ||
} | ||
|
||
public static MongoDBConnection createMongoDBConnection() { | ||
FileConfiguration config = LuckPrefix.getInstance().getConfig(); | ||
return new MongoDBConnection( | ||
config.getString("Database.MariaDB.Host"), | ||
config.getInt("Database.MariaDB.Port"), | ||
config.getString("Database.MariaDB.User"), | ||
config.getString("Database.MariaDB.Password"), | ||
config.getString("Database.MariaDB.Database") | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
luckprefix-modern/src/main/java/de/eztxm/luckprefix/util/database/MongoDBProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package de.eztxm.luckprefix.util.database; | ||
|
||
import de.eztxm.database.MongoDBConnection; | ||
|
||
public class MongoDBProcessor { | ||
private final MongoDBConnection connection; | ||
|
||
public MongoDBProcessor(MongoDBConnection connection) { | ||
this.connection = connection; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...efix/util/database/DatabaseProcessor.java → ...x/util/database/SQLDatabaseProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters