mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 17:04:18 +01:00
Implement executeUpdate
This commit is contained in:
@@ -24,6 +24,7 @@ import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import org.github.tursodatabase.annotations.SkipNullableCheck;
|
||||
import org.github.tursodatabase.core.LimboConnection;
|
||||
import org.github.tursodatabase.core.LimboResultSet;
|
||||
|
||||
public class JDBC4PreparedStatement extends JDBC4Statement implements PreparedStatement {
|
||||
|
||||
@@ -46,7 +47,11 @@ public class JDBC4PreparedStatement extends JDBC4Statement implements PreparedSt
|
||||
|
||||
@Override
|
||||
public int executeUpdate() throws SQLException {
|
||||
// TODO
|
||||
requireNonNull(this.statement);
|
||||
final LimboResultSet resultSet = statement.getResultSet();
|
||||
resultSet.consumeAll();
|
||||
|
||||
// TODO: return updated count
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -253,10 +253,8 @@ public class JDBC4Statement implements Statement {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SkipNullableCheck
|
||||
public Connection getConnection() throws SQLException {
|
||||
// TODO
|
||||
return null;
|
||||
public Connection getConnection() {
|
||||
return connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -274,32 +272,32 @@ public class JDBC4Statement implements Statement {
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
|
||||
// TODO
|
||||
return 0;
|
||||
// TODO: enhance
|
||||
return executeUpdate(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
|
||||
// TODO
|
||||
return 0;
|
||||
// TODO: enhance
|
||||
return executeUpdate(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeUpdate(String sql, String[] columnNames) throws SQLException {
|
||||
// TODO
|
||||
return 0;
|
||||
// TODO: enhance
|
||||
return executeUpdate(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
|
||||
// TODO
|
||||
return false;
|
||||
// TODO: enhance
|
||||
return execute(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
|
||||
// TODO
|
||||
return false;
|
||||
// TODO: enhance
|
||||
return execute(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user