Skip to content

Commit

Permalink
refactor: check if null in PreparedStatement (#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
vighnesh-kadam authored May 11, 2022
1 parent f105a59 commit 3701cc2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,12 @@ protected void dataBuild() throws SQLException {
columnTypes.AddColumnType(types.get(i + 1));
}
this.currentRow = SQLRequestRow.CreateSQLRequestRowFromColumnTypes(columnTypes);
// TODO(hw): check if null
if (this.currentRow == null) {
throw new SQLException("fail to create sql request row from column types");
}
this.currentSchema = this.currentRow.GetSchema();
this.orgTypes = this.types;
}
if (this.currentRow == null) {
throw new SQLException("fail to build data with null row");
}
if (this.currentSchema == null) {
throw new SQLException("fail to build data with null schema");
}
Expand Down

0 comments on commit 3701cc2

Please sign in to comment.