File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -436,15 +436,28 @@ public function prepare($yql)
436
436
/**
437
437
* @param string $path
438
438
* @param array $columns
439
+ * @param array $options
439
440
* @return \Generator
440
441
*/
441
- public function readTable ($ path , $ columns = [])
442
+ public function readTable ($ path , $ columns = [], $ options = [] )
442
443
{
443
- return $ this -> streamRequest ( ' StreamReadTable ' , [
444
+ $ params = [
444
445
'session_id ' => $ this ->session_id ,
445
446
'path ' => $ this ->pathPrefix ($ path ),
446
447
'columns ' => $ columns ,
447
- ]);
448
+ ];
449
+
450
+ if (isset ($ options ['row_limit ' ]))
451
+ {
452
+ $ params ['row_limit ' ] = (int )$ options ['row_limit ' ];
453
+ }
454
+
455
+ if (isset ($ options ['ordered ' ]))
456
+ {
457
+ $ params ['ordered ' ] = (bool )$ options ['ordered ' ];
458
+ }
459
+
460
+ return $ this ->streamRequest ('StreamReadTable ' , $ params );
448
461
}
449
462
450
463
/**
Original file line number Diff line number Diff line change @@ -261,11 +261,12 @@ public function prepare($yql)
261
261
*
262
262
* @param string $path
263
263
* @param array $columns
264
+ * @param array $options
264
265
* @return \Generator
265
266
*/
266
- public function readTable ($ path , $ columns = [])
267
+ public function readTable ($ path , $ columns = [], $ options = [] )
267
268
{
268
- return $ this ->session ()->readTable ($ path , $ columns );
269
+ return $ this ->session ()->readTable ($ path , $ columns, $ options );
269
270
}
270
271
271
272
/**
You can’t perform that action at this time.
0 commit comments