Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bowbahdoe committed Feb 27, 2024
1 parent 0b85eeb commit c348e20
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions src/main/java/dev/mccue/jdbc/ResultSets.java
Original file line number Diff line number Diff line change
Expand Up @@ -474,21 +474,4 @@ public static Double getDoubleNullable(ResultSet rs, int index) throws SQLExcept
}
return value;
}

/**
* Gets a double value from a {@link ResultSet}, returning null
* if the column is null.
*
* @param rs The {@link ResultSet}
* @param columnName The column to get.
* @return A double value
* @throws SQLException If the driver throws an exception.
*/
public static Double getDoubleNullable(ResultSet rs, String columnName) throws SQLException {
var value = rs.getDouble(columnName);
if (rs.wasNull()) {
return null;
}
return value;
}
}
2 changes: 1 addition & 1 deletion src/main/java/dev/mccue/jdbc/StatementPreparer.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public PreparedStatement process(StringTemplate stringTemplate) throws SQLExcept
var params = new ArrayList<SettableParameter>();
var strings = new StringBuilder();

for (int i = 0; i < valuesSize; ++i) {
for (int i = 0; i < valuesSize; i++) {
strings.append(fragments.get(i));
var value = values.get(i);
switch (value) {
Expand Down

0 comments on commit c348e20

Please sign in to comment.