Page MenuHomePhabricator

Expect json as parameters and include implicit db
ClosedPublic

Authored by dcaro on Nov 24 2020, 10:10 AM.

Details

Reviewers
dcaro
Patch without arc
git checkout -b D1188 && curl -L https://phabricator.wikimedia.org/D1188?download=true | git apply
Summary

It turns out that when passing the raw sql as form data the newlines
were being lost, this ensures that they are preserved by passing a
json blob instead.

This also includes a new 'implicit_db' to the list of detected
databases as it can be that a query is using it.

Signed-off-by: David Caro <david@dcaro.es>

Test Plan

Modified the tests to send the params as json.
Added the tests for the use cases for implicit db detection.
Ran locally with curl to see the error when the wrong headers are passed, and
the success when the good ones.

Diff Detail

Repository
R2884 tool-sqlchecker
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 3287
Build 5448: arc lint + arc unit

Event Timeline

dcaro created this revision.
This revision is now accepted and ready to land.Nov 24 2020, 10:12 AM