mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Implement executeUpdate
This commit is contained in:
parent
ed9cf63c51
commit
d1789d1d6e
2 changed files with 18 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue