Skip to content

Commit

Permalink
remove plain sql and postgresql.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Aug 16, 2024
1 parent ccaec4a commit 1d27284
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ dependencies {
implementation("com.zaxxer:HikariCP:5.1.0")

// Database drivers
implementation("mysql:mysql-connector-java:8.0.33")
implementation("org.postgresql:postgresql:42.7.3")
implementation("com.h2database:h2:2.3.232")
implementation("org.mariadb.jdbc:mariadb-java-client:3.4.1")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,10 @@ public void connect() throws SQLException {
this.hikariDataSource.setPassword(this.config.password);

switch (this.config.type) {
case MYSQL -> {
this.hikariDataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
this.hikariDataSource.setJdbcUrl("jdbc:mysql://" + this.config.host + ":" + this.config.port + "/" + this.config.database);
}
case MARIA_DB -> {
this.hikariDataSource.setDriverClassName("org.mariadb.jdbc.Driver");
this.hikariDataSource.setJdbcUrl("jdbc:mariadb://" + this.config.host + ":" + this.config.port + "/" + this.config.database);
}
case POSTGRESQL -> {
this.hikariDataSource.setDriverClassName("org.postgresql.Driver");
this.hikariDataSource.setJdbcUrl("jdbc:postgresql://" + this.config.host + ":" + this.config.port + "/" + this.config.database);
}
case H2 -> {
this.hikariDataSource.setDriverClassName("org.h2.Driver");
this.hikariDataSource.setJdbcUrl("jdbc:h2:" + this.folder.getAbsolutePath() + "/database");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.eternalcode.discordapp.database;

public enum DatabaseType {
MYSQL,
MARIA_DB,
POSTGRESQL,
H2
}

0 comments on commit 1d27284

Please sign in to comment.