Skip to content

Commit a014bd6

Browse files
committed
Add ConnectionFactoryProvider.getDriver() implementation
getDriver() returns the driver identifier postgresql. [resolves pgjdbc#77]
1 parent 5a304ff commit a014bd6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionFactoryProvider.java

+5
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,9 @@ public boolean supports(ConnectionFactoryOptions connectionFactoryOptions) {
9898

9999
return true;
100100
}
101+
102+
@Override
103+
public String getDriver() {
104+
return POSTGRESQL_DRIVER;
105+
}
101106
}

src/test/java/io/r2dbc/postgresql/PostgresqlConnectionFactoryProviderTest.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,9 @@ void supports() {
102102
.option(USER, "test-user")
103103
.build())).isTrue();
104104
}
105-
}
105+
106+
@Test
107+
void returnsDriverIdentifier() {
108+
assertThat(this.provider.getDriver()).isEqualTo(POSTGRESQL_DRIVER);
109+
}
110+
}

0 commit comments

Comments
 (0)