DASSL / ClassDB

An open-source system to let students experiment with relational data
https://dassl.github.io/ClassDB/
Other
8 stars 2 forks source link

Add Guard for DROP OWNED BY #271

Closed KevinKelly25 closed 6 years ago

KevinKelly25 commented 6 years ago

This PR adds a temporary function that when given a DROP OWNED BY query it will dynamically execute the query with an attached CURRENT_USER. All uses of DROP OWNED BY CURRENT_USER have been replaced with this temporary function with the replaced query as the parameter. This also maintains the purposefully odd case of DrOP oWNeD BY on Ln120.

Fixes #269

afig commented 6 years ago

Changes look good and follow the recommend implementation. I only noticed some minor comment issues:

smurthys commented 6 years ago

Thanks @KevinKelly25. Just one minor improvement: change parameter name query to queryHead because its value is only the beginning of a query, rather than the entire query.

(I have yet to test the changes.)

KevinKelly25 commented 6 years ago

Thank you for the suggestion, it makes a lot more sense this way. I updated the variable name.

KevinKelly25 commented 6 years ago

@afig Thank you for the the suggestions. I think you and @smurthys posted around the same time and I missed your comment somehow. I apologize for that. I fixed the issues you mentioned.

KevinKelly25 commented 6 years ago

Thank you for the reviews