Skip to content

Commit 733c07f

Browse files
Added JdbcDatabaseConnectionFactory.
Ensures the newConnection method in JdbcDatabase returns a JdbcDatabaseConnection.
1 parent 30795e1 commit 733c07f

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.softwareverde'
2-
version '3.0.3'
2+
version '3.1.0'
33

44
apply plugin: 'java'
55
apply plugin: 'java-library'

src/main/java/com/softwareverde/database/jdbc/JdbcDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
/**
88
* Convenience interface to avoid specifying the generic type everywhere when using JDBC.
99
*/
10-
public interface JdbcDatabase extends Database<Connection> { }
10+
public interface JdbcDatabase extends Database<Connection>, JdbcDatabaseConnectionFactory { }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.softwareverde.database.jdbc;
2+
3+
import com.softwareverde.database.DatabaseConnectionFactory;
4+
import com.softwareverde.database.DatabaseException;
5+
6+
import java.sql.Connection;
7+
8+
public interface JdbcDatabaseConnectionFactory extends DatabaseConnectionFactory<Connection> {
9+
@Override
10+
JdbcDatabaseConnection newConnection() throws DatabaseException;
11+
}

0 commit comments

Comments
 (0)