Skip to content

Commit 95690ae

Browse files
committed
fix: bugs
1 parent 1b8b49d commit 95690ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/code/advancedsql/query/ExecuteQuery.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ public ResultSet fetchAll() throws SQLException {
5353
public List<Map<String, Object>> fetchAllAsList() throws SQLException {
5454
ResultSet resultSet = this.fetchAll();
5555

56-
return ISQL.convertResultSetToList(resultSet);
56+
List<Map<String, Object>> list = ISQL.convertResultSetToList(resultSet);
57+
58+
prepare.close();
59+
60+
return list;
5761
}
5862

5963
/**

src/main/java/com/code/advancedsql/query/Query.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ public ResultSet executeQuery() throws SQLException {
4646

4747
ISQL.setStatementParameters(this.prepare, this.execute);
4848

49-
ResultSet result = prepare.executeQuery();
50-
51-
prepare.close();
52-
53-
return result;
49+
return prepare.executeQuery();
5450
}
5551

5652
public int executeUpdate() throws SQLException {

0 commit comments

Comments
 (0)