Set return type from double to float
This commit is contained in:
parent
709202574a
commit
ee9a6db15a
11 changed files with 77 additions and 19 deletions
|
|
@ -29,8 +29,8 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>8.0.33</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ public class SqlUtils {
|
|||
|
||||
public static Connection createH2Connection(String path, String username, String password) throws SqlException {
|
||||
try {
|
||||
DriverManager.registerDriver(new org.h2.Driver());
|
||||
Connection connection;
|
||||
if (username != null) {
|
||||
connection = DriverManager.getConnection("jdbc:h2:./" + path + ";mode=MySQL;AUTO_SERVER=TRUE", username, password);
|
||||
|
|
@ -57,10 +56,7 @@ public class SqlUtils {
|
|||
}
|
||||
}
|
||||
try {
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
return DriverManager.getConnection("jdbc:sqlite:" + path);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new SqlException("No suitable driver");
|
||||
} catch (SQLException e) {
|
||||
throw new SqlException(e);
|
||||
}
|
||||
|
|
@ -144,5 +140,6 @@ public class SqlUtils {
|
|||
static {
|
||||
initializeH2();
|
||||
initializeMySql();
|
||||
initializeSqlite();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue