Skip to content

Commit 3b058dd

Browse files
committed
Update SQL.java
1 parent 0818ddc commit 3b058dd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • src/main/java/io/github/intisy/utils/database

src/main/java/io/github/intisy/utils/database/SQL.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
@SuppressWarnings({"unused", "SqlNoDataSourceInspection", "SqlSourceToSinkFlow"})
1313
public class SQL {
14-
1514
private static final Pattern VALID_IDENTIFIER_PATTERN = Pattern.compile("^[A-Za-z_][A-Za-z0-9_]*$");
1615
private static final int MAX_IDENTIFIER_LENGTH = 64;
1716

@@ -30,8 +29,12 @@ public enum DatabaseType {
3029
}
3130

3231
public SQL(File dbFile) {
32+
this(dbFile, new EmptyLogger());
33+
}
34+
35+
public SQL(File dbFile, SimpleLogger logger) {
3336
this("jdbc:sqlite:" + requireNonNull(dbFile.getAbsolutePath(), "dbFilePath cannot be null"),
34-
null, null, new EmptyLogger());
37+
null, null, logger);
3538
}
3639

3740
public SQL(String host, int port, String database, String username, String password) {

0 commit comments

Comments
 (0)