@@ -282,7 +282,7 @@ public List<String> getColumnNames(String tableName) throws SQLException {
282282 result .add (rs .getString (COLUMN_NAME ));
283283 }
284284 return !SYSTEM_SUBQUERY .equals (tableName ) ? result : null ;
285- }).orThrow (ex -> ex );
285+ }).orThrow (ex -> ( SQLException ) ex );
286286 }
287287
288288 public String getColumnName (String escapedTableName , String escapedColumnName ) throws SQLException {
@@ -297,7 +297,7 @@ public String getColumnName(String escapedTableName, String escapedColumnName) t
297297 }
298298 }
299299 return null ;
300- }).orThrow (ex -> ex );
300+ }).orThrow (ex -> ( SQLException ) ex );
301301 }
302302
303303 public String getEscapedColumnName (String tableName , String columnName ) throws SQLException {
@@ -306,15 +306,15 @@ public String getEscapedColumnName(String tableName, String columnName) throws S
306306 ps .setString (2 , columnName );
307307 ResultSet rs = ps .executeQuery ();
308308 return rs .next () ? rs .getString (ESCAPED_COLUMN_NAME ) : null ;
309- }).orThrow (ex -> ex );
309+ }).orThrow (ex -> ( SQLException ) ex );
310310 }
311311
312312 public String getEscapedTableName (String tableName ) throws SQLException {
313313 return Try .withResources (() -> conn .prepareStatement (SELECT_TABLE_ESCAPED ), ps -> {
314314 ps .setString (1 , tableName );
315315 ResultSet rs = ps .executeQuery ();
316316 return rs .next () ? rs .getString (ESCAPED_TABLE_NAME ) : null ;
317- }).orThrow (ex -> ex );
317+ }).orThrow (ex -> ( SQLException ) ex );
318318 }
319319
320320 public boolean isAutoIncrement (String tableName , String columnName ) throws SQLException {
@@ -323,7 +323,7 @@ public boolean isAutoIncrement(String tableName, String columnName) throws SQLEx
323323 ps .setString (2 , columnName );
324324 ResultSet rs = ps .executeQuery ();
325325 return rs .next () && rs .getBoolean (IS_AUTOINCREMENT );
326- }).orThrow (ex -> ex );
326+ }).orThrow (ex -> ( SQLException ) ex );
327327 }
328328
329329 public boolean isCurrency (String tableName , String columnName ) throws SQLException {
@@ -332,30 +332,30 @@ public boolean isCurrency(String tableName, String columnName) throws SQLExcepti
332332 ps .setString (2 , columnName );
333333 ResultSet rs = ps .executeQuery ();
334334 return rs .next () && rs .getBoolean (IS_CURRENCY );
335- }).orThrow (ex -> ex );
335+ }).orThrow (ex -> ( SQLException ) ex );
336336 }
337337
338338 public Integer getTableId (String escapedName ) throws SQLException {
339339 return Try .withResources (() -> conn .prepareStatement (SELECT_TABLE_METADATA ), ps -> {
340340 ps .setString (1 , escapedName );
341341 ResultSet rs = ps .executeQuery ();
342342 return rs .next () ? rs .getInt (TABLE_ID ) : -1 ;
343- }).orThrow (ex -> ex );
343+ }).orThrow (ex -> ( SQLException ) ex );
344344 }
345345
346346 public String getTableName (String escapedName ) throws SQLException {
347347 return Try .withResources (() -> conn .prepareStatement (SELECT_TABLE_METADATA ), ps -> {
348348 ps .setString (1 , escapedName );
349349 ResultSet rs = ps .executeQuery ();
350350 return rs .next () ? rs .getString (TABLE_NAME ) : null ;
351- }).orThrow (ex -> ex );
351+ }).orThrow (ex -> ( SQLException ) ex );
352352 }
353353
354354 public void dropTable (String tableName ) throws SQLException {
355355 Try .withResources (() -> conn .prepareStatement (DROP_TABLE ), ps -> {
356356 ps .setString (1 , tableName );
357357 ps .execute ();
358- }).orThrow (ex -> ex );
358+ }).orThrow (ex -> ( SQLException ) ex );
359359 }
360360
361361 public void columnDef (String tableName , String columnName , String def ) throws SQLException {
@@ -364,15 +364,15 @@ public void columnDef(String tableName, String columnName, String def) throws SQ
364364 ps .setString (2 , columnName );
365365 ps .setString (3 , tableName );
366366 ps .execute ();
367- }).orThrow (ex -> ex );
367+ }).orThrow (ex -> ( SQLException ) ex );
368368 }
369369
370370 public void calculatedField (String tableName , String columnName ) throws SQLException {
371371 Try .withResources (() -> conn .prepareStatement (UPDATE_IS_GENERATEDCOLUMN ), ps -> {
372372 ps .setString (1 , columnName );
373373 ps .setString (2 , tableName );
374374 ps .execute ();
375- }).orThrow (ex -> ex );
375+ }).orThrow (ex -> ( SQLException ) ex );
376376 }
377377
378378 public void rename (String oldTableName , String newTableName , String newEscapedTableName ) throws SQLException {
@@ -381,7 +381,7 @@ public void rename(String oldTableName, String newTableName, String newEscapedTa
381381 ps .setString (2 , newEscapedTableName );
382382 ps .setString (3 , oldTableName );
383383 ps .executeUpdate ();
384- }).orThrow (ex -> ex );
384+ }).orThrow (ex -> ( SQLException ) ex );
385385 }
386386
387387}
0 commit comments