Skip to content

Commit ad0a35c

Browse files
authored
fix: cleanup unused methods (#1635)
1 parent 4d72c4f commit ad0a35c

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public void setAsciiStream(int parameterIndex, InputStream value, int length)
170170
parameters.setParameter(parameterIndex, value, Types.VARCHAR, length);
171171
}
172172

173+
@SuppressWarnings("DeprecatedIsStillUsed")
173174
@Override
174175
@Deprecated
175176
public void setUnicodeStream(int parameterIndex, InputStream value, int length)

src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcStatement.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,6 @@ private <T> T doWithStatementTimeout(
243243
}
244244
}
245245

246-
/**
247-
* Executes a SQL statement on the connection of this {@link Statement} as an update (DML)
248-
* statement.
249-
*
250-
* @param statement The SQL statement to execute
251-
* @return the number of rows that was inserted/updated/deleted
252-
* @throws SQLException if a database error occurs, or if the number of rows affected is larger
253-
* than {@link Integer#MAX_VALUE}
254-
*/
255-
int executeUpdate(com.google.cloud.spanner.Statement statement) throws SQLException {
256-
return checkedCast(executeLargeUpdate(statement));
257-
}
258-
259246
/**
260247
* Do a checked cast from long to int. Throws a {@link SQLException} with code {@link
261248
* 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 {
268255
return (int) updateCount;
269256
}
270257

271-
/**
272-
* Executes a SQL statement on the connection of this {@link Statement} as an update (DML)
273-
* statement.
274-
*
275-
* @param statement The SQL statement to execute
276-
* @return the number of rows that was inserted/updated/deleted
277-
* @throws SQLException if a database error occurs
278-
*/
279-
long executeLargeUpdate(com.google.cloud.spanner.Statement statement) throws SQLException {
280-
return doWithStatementTimeout(() -> connection.getSpannerConnection().executeUpdate(statement));
281-
}
282-
283258
/**
284259
* Executes a SQL statement on the connection of this {@link Statement}. The SQL statement can be
285260
* any supported SQL statement, including client side statements such as SET AUTOCOMMIT ON|OFF.

0 commit comments

Comments
 (0)