-
Notifications
You must be signed in to change notification settings - Fork 58
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
format on Sql #156
format on Sql #156
Conversation
Please amend the commit with passing DCO ( Is there some kind of test we can write to exercise this? |
Signed-off-by: archipelweb <github@archipel-web.com>
…/opensearch-php into dev-branch-issue-155
We done the commit to validate this modification:
/*
load client with credentials
*/
$request="SELECT * FROM `my-index`";
$params=['query' => $request];
$result = $client->sql()->query($params); the return:
/*
load client with credentials
*/
$params=['query' => $request];
$params['format']='json';
$result = $client->sql()->query($params); the return:
|
|
Codecov Report
@@ Coverage Diff @@
## main #156 +/- ##
=========================================
Coverage 24.14% 24.14%
Complexity 1937 1937
=========================================
Files 246 246
Lines 6863 6863
=========================================
Hits 1657 1657
Misses 5206 5206
|
Sorry dblock, |
I think it's a great small change! Without tests the feature can break quietly, and I am sure you wouldn't like that suddenly a future release gets cut and your added feature is broken! If you have time to finish this PR, thank you, if not let's hope someone picks it up from where you left it off. Thanks for getting it this far. |
cherry-pick from @archipelweb see: opensearch-project#156 Signed-off-by: archipelweb <github@archipel-web.com>
cherry-pick from @archipelweb see: opensearch-project#156 Signed-off-by: archipelweb <github@archipel-web.com>
I was so kind and have extended it with tests in a new PR #161. This is a nice feature to have, thank you @archipelweb for beginning this feature. |
cherry-pick from @archipelweb see: opensearch-project#156 Signed-off-by: archipelweb <github@archipel-web.com>
…at (#161) * feat: add test for SQL query endpoint Signed-off-by: Salih Candir <salih@live.at> * format on Sql cherry-pick from @archipelweb see: #156 Signed-off-by: archipelweb <github@archipel-web.com> * docs: add 'format' to allowed SQL query params Signed-off-by: Salih Candir <salih@live.at> * docs: update changelog Signed-off-by: Salih Candir <salih@live.at> * feat: make failed message of testFormatParamIsAllowedToSet more precise Signed-off-by: Salih Candir <salih@live.at> * refactor: add an line break at the end of line Signed-off-by: Salih Candir <salih@live.at> * docs: add example how to use query using sql Signed-off-by: Salih Candir <salih@live.at> --------- Signed-off-by: Salih Candir <salih@live.at> Signed-off-by: archipelweb <github@archipel-web.com> Co-authored-by: archipelweb <github@archipel-web.com>
Yeah, @CSalih that's really kind ! Tank you very much for this. |
Closing after #161 was merged. Thank @archipelweb and @CSalih for contributing! |
Description
Allow to use a format parameter for sql plugin
Issues Resolved
#155