1 | <?php |
||
25 | class ResultsSession |
||
26 | { |
||
27 | /** @var QueryResult[] */ |
||
28 | private $results = []; |
||
29 | |||
30 | /** @var StatementClient */ |
||
31 | private $prestoClient; |
||
32 | |||
33 | /** @var int */ |
||
34 | private $timeout = 500000; |
||
35 | |||
36 | /** @var bool */ |
||
37 | private $debug = false; |
||
38 | |||
39 | /** |
||
40 | * @param StatementClient $prestoClient |
||
41 | * @param int $timeout |
||
42 | * @param bool $debug |
||
43 | */ |
||
44 | public function __construct(StatementClient $prestoClient, int $timeout = 500000, bool $debug = false) |
||
50 | |||
51 | /** |
||
52 | * @return ResultsSession |
||
53 | */ |
||
54 | public function execute(): ResultsSession |
||
60 | |||
61 | /** |
||
62 | * @return \Generator |
||
63 | */ |
||
64 | public function yieldResults(): \Generator |
||
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | public function getResults(): array |
||
84 | |||
85 | /** |
||
86 | * @param QueryResult $queryResult |
||
87 | */ |
||
88 | private function addResults(QueryResult $queryResult) |
||
92 | } |
||
93 |