mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-10 03:34:20 +01:00
Override JDBC4PreparedStatement to throw exception when calling addBatch method
This commit is contained in:
@@ -176,6 +176,11 @@ public final class JDBC4PreparedStatement extends JDBC4Statement implements Prep
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch(String sql) throws SQLException {
|
||||
throw new SQLException("addBatch(String) cannot be called on a PreparedStatement");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharacterStream(int parameterIndex, Reader reader, int length)
|
||||
throws SQLException {}
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import tech.turso.annotations.Nullable;
|
||||
import tech.turso.annotations.SkipNullableCheck;
|
||||
import tech.turso.core.TursoResultSet;
|
||||
@@ -261,7 +260,6 @@ public class JDBC4Statement implements Statement {
|
||||
|
||||
int[] updateCounts = new int[batchCommands.size()];
|
||||
List<String> failedCommands = new ArrayList<>();
|
||||
int[] successfulCounts = new int[batchCommands.size()];
|
||||
|
||||
// Execute each command in the batch
|
||||
for (int i = 0; i < batchCommands.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user