-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: output the number of updated rows
- Loading branch information
Showing
7 changed files
with
126 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...s/core/src/main/java/com/tsurugidb/console/core/executor/sql/PreparedStatementResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.tsurugidb.console.core.executor.sql; | ||
|
||
import java.io.IOException; | ||
|
||
import com.tsurugidb.tsubakuro.exception.ServerException; | ||
import com.tsurugidb.tsubakuro.sql.ExecuteResult; | ||
import com.tsurugidb.tsubakuro.sql.ResultSet; | ||
|
||
public class PreparedStatementResult implements AutoCloseable { | ||
|
||
private final ResultSet resultSet; | ||
private final ExecuteResult executeResult; | ||
|
||
public PreparedStatementResult(ResultSet resultSet) { | ||
this.resultSet = resultSet; | ||
this.executeResult = null; | ||
} | ||
|
||
public PreparedStatementResult(ExecuteResult executeResult) { | ||
this.resultSet = null; | ||
this.executeResult = executeResult; | ||
} | ||
|
||
public ResultSet getResultSet() { | ||
return this.resultSet; | ||
} | ||
|
||
public ExecuteResult getExecuteResult() { | ||
return this.executeResult; | ||
} | ||
|
||
@Override | ||
public void close() throws ServerException, IOException, InterruptedException { | ||
try (resultSet) { | ||
// close only | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters