Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if null in PreparedStatement #1759

Closed
vagetablechicken opened this issue May 7, 2022 · 2 comments · Fixed by #1795
Closed

check if null in PreparedStatement #1759

vagetablechicken opened this issue May 7, 2022 · 2 comments · Fixed by #1795
Assignees
Labels
good first issue Good for newcomers

Comments

@vagetablechicken
Copy link
Collaborator

this.currentRow = SQLRequestRow.CreateSQLRequestRowFromColumnTypes(columnTypes);
// TODO(hw): check if null
this.currentSchema = this.currentRow.GetSchema();
this.orgTypes = this.types;

currentRow may be null, check it before call GetSchema. If it's null, throw an exception.

And then, Line 279 this.currentRow == null below is useless. Delete it.

if (this.currentRow == null) {
throw new SQLException("fail to build data with null row");
}

@vagetablechicken vagetablechicken added the good first issue Good for newcomers label May 7, 2022
@vighnesh-kadam
Copy link
Contributor

Can you please assign this to me ? I need to just put the "if codeblock" from line 279 to line 275 right?

@lumianph
Copy link
Collaborator

@vighnesh-kadam i have assigned to you. You can use if to check the null according to the description above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants