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
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.UUID; | |
import com.zaxxer.hikari.HikariConfig; | |
import com.zaxxer.hikari.HikariDataSource; |
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
import java.io.Serializable; | |
import java.util.Objects; | |
/** | |
* Tuple | |
* | |
* @param <X> First element | |
* @param <Y> Second element | |
*/ | |
public class Tuple<X, Y> implements Serializable { |
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
public class SQLConnection { | |
private final Connection connection; | |
public SQLConnection(String url, String username, String password) throws SQLException { | |
this.connection = DriverManager.getConnection(url, username, password); | |
} | |
public ResultSet executeQuery(String query) throws SQLException { | |
Statement statement = this.connection.createStatement(); | |
return statement.executeQuery(query); |