1 | <?php |
||
9 | class ResultsSession |
||
10 | { |
||
11 | /** @var QueryResult[] */ |
||
12 | private $results = []; |
||
13 | |||
14 | /** @var StatementClient */ |
||
15 | private $prestoClient; |
||
16 | |||
17 | /** @var int */ |
||
18 | private $timeout = 500000; |
||
19 | |||
20 | /** @var bool */ |
||
21 | private $debug = false; |
||
22 | |||
23 | /** |
||
24 | * @param StatementClient $prestoClient |
||
25 | * @param int $timeout |
||
26 | * @param bool $debug |
||
27 | */ |
||
28 | public function __construct(StatementClient $prestoClient, int $timeout = 500000, bool $debug = false) |
||
34 | |||
35 | /** |
||
36 | * @return ResultsSession |
||
37 | */ |
||
38 | public function execute(): ResultsSession |
||
44 | |||
45 | /** |
||
46 | * @return \Generator |
||
47 | */ |
||
48 | public function yieldResults(): \Generator |
||
55 | |||
56 | /** |
||
57 | * @return array |
||
58 | */ |
||
59 | public function getResults(): array |
||
68 | |||
69 | /** |
||
70 | * @param QueryResult $queryResult |
||
71 | */ |
||
72 | private function addResults(QueryResult $queryResult) |
||
76 | } |
||
77 |