From ad0a35c82fd880ce5b705f4cb749c35664ccc604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Wed, 5 Jun 2024 08:10:01 +0200 Subject: [PATCH] fix: cleanup unused methods (#1635) --- .../jdbc/AbstractJdbcPreparedStatement.java | 1 + .../spanner/jdbc/AbstractJdbcStatement.java | 25 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java b/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java index 2a9ba067d..9c58a5239 100644 --- a/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java +++ b/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java @@ -170,6 +170,7 @@ public void setAsciiStream(int parameterIndex, InputStream value, int length) parameters.setParameter(parameterIndex, value, Types.VARCHAR, length); } + @SuppressWarnings("DeprecatedIsStillUsed") @Override @Deprecated public void setUnicodeStream(int parameterIndex, InputStream value, int length) diff --git a/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcStatement.java b/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcStatement.java index d12678bf2..f3a1539b8 100644 --- a/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcStatement.java +++ b/src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcStatement.java @@ -243,19 +243,6 @@ private T doWithStatementTimeout( } } - /** - * Executes a SQL statement on the connection of this {@link Statement} as an update (DML) - * statement. - * - * @param statement The SQL statement to execute - * @return the number of rows that was inserted/updated/deleted - * @throws SQLException if a database error occurs, or if the number of rows affected is larger - * than {@link Integer#MAX_VALUE} - */ - int executeUpdate(com.google.cloud.spanner.Statement statement) throws SQLException { - return checkedCast(executeLargeUpdate(statement)); - } - /** * Do a checked cast from long to int. Throws a {@link SQLException} with code {@link * Code#OUT_OF_RANGE} if the update count is too big to fit in an int. @@ -268,18 +255,6 @@ int checkedCast(long updateCount) throws SQLException { return (int) updateCount; } - /** - * Executes a SQL statement on the connection of this {@link Statement} as an update (DML) - * statement. - * - * @param statement The SQL statement to execute - * @return the number of rows that was inserted/updated/deleted - * @throws SQLException if a database error occurs - */ - long executeLargeUpdate(com.google.cloud.spanner.Statement statement) throws SQLException { - return doWithStatementTimeout(() -> connection.getSpannerConnection().executeUpdate(statement)); - } - /** * Executes a SQL statement on the connection of this {@link Statement}. The SQL statement can be * any supported SQL statement, including client side statements such as SET AUTOCOMMIT ON|OFF.