-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: warn when SQL parameters are unused #9841
Conversation
All images
|
IdSchema, | ||
); | ||
if (updated == null) { | ||
if (item.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel a bit hesitant to check for truthy instead of for explicit null/undefined.
if (item.id) { | |
if (item.id != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I'll fix that.
sql.select_assessment_instance_group, | ||
{ | ||
assessment_id, | ||
uid: json.uid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is not used, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'll fix that too. I guess I was expecting a test to fail but maybe we never run something on that branch.
Checks in realtime to see if a SQL query was passed more parameters than were used in the query and logs with a warning.