File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -396,11 +396,17 @@ public function describeTable($table)
396396
397397 /**
398398 * @param string $yql
399- * @param ScanQueryMode $mode
399+ * @param array $parameters
400+ * @param int $mode
400401 * @return \Generator
402+ * @throws Exception
401403 */
402- public function scanQuery ($ yql , $ mode = ScanQueryMode::MODE_EXEC )
404+ public function scanQuery ($ yql , $ parameters = [], $ mode = ScanQueryMode::MODE_EXEC )
403405 {
406+ if ($ parameters != []){
407+ throw new Exception ("Not implemented " );
408+ }
409+
404410 $ q = new Query (['yql_text ' => $ yql ]);
405411
406412 return $ this ->streamRequest ('StreamExecuteScanQuery ' , [
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ class ScanQueryTest extends TestCase
1313
1414 function testScanQuery ()
1515 {
16- self ::expectNotToPerformAssertions ();
1716
1817 $ config = [
1918
@@ -49,13 +48,17 @@ function testScanQuery()
4948FROM scan_table
5049WHERE id = 1; ' ;
5150
52- $ scanWithOutParam = $ table ->scanQuery ($ yql );
53- $ scanWithExplainParam = $ table ->scanQuery ($ yql , ScanQueryMode::MODE_EXPLAIN );
54- $ scanWithExecParam = $ table ->scanQuery ($ yql , ScanQueryMode::MODE_EXEC );
51+ $ scanWithOutMode = $ table ->scanQuery ($ yql );
52+ $ scanWithExplainMode = $ table ->scanQuery ($ yql, [] , ScanQueryMode::MODE_EXPLAIN );
53+ $ scanWithExecMode = $ table ->scanQuery ($ yql, [] , ScanQueryMode::MODE_EXEC );
5554
5655 // These `foreach` needs for requests
57- foreach ($ scanWithOutParam as $ value ){}
58- foreach ($ scanWithExplainParam as $ value ){}
59- foreach ($ scanWithExecParam as $ value ){}
56+ foreach ($ scanWithOutMode as $ value ){}
57+ foreach ($ scanWithExplainMode as $ value ){}
58+ foreach ($ scanWithExecMode as $ value ){}
59+
60+ self ::expectExceptionMessage ("Not implemented " );
61+ $ scanWithParams = $ table ->scanQuery ($ yql , ["value " =>"some " ]);
62+ foreach ($ scanWithParams as $ value ){}
6063 }
6164}
You can’t perform that action at this time.
0 commit comments