Skip to content

Commit

Permalink
FIR-31966 implemented nativeSQL()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed Apr 15, 2024
1 parent 72fc714 commit 4dde5b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,8 @@ public int getConnectionTimeout() {
}

@Override
@NotImplemented
public String nativeSQL(String sql) throws SQLException {
throw new FireboltUnsupportedOperationException();
public String nativeSQL(String sql) {
return sql;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ private static Stream<Arguments> unsupported() {

Arguments.of("setTypeMap", (Executable) () -> connection.setTypeMap(Map.of())),

Arguments.of("rollback(savepoint)", (Executable) () -> connection.rollback(mock(Savepoint.class))),
Arguments.of("nativeSQL", (Executable) () -> connection.nativeSQL("select 1"))
Arguments.of("rollback(savepoint)", (Executable) () -> connection.rollback(mock(Savepoint.class)))
);
}

Expand Down Expand Up @@ -641,5 +640,12 @@ void shouldGetEngineUrlWhenEngineIsProvided() throws SQLException {
}
}

@Test
void nativeSql() throws SQLException {
try (FireboltConnection connection = createConnection(URL, connectionProperties)) {
assertEquals("SELECT 1", connection.nativeSQL("SELECT 1"));
}
}

protected abstract FireboltConnection createConnection(String url, Properties props) throws SQLException;
}

0 comments on commit 4dde5b8

Please sign in to comment.