| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class PdoExtractor extends DbExtractorAbstract |
||
| 19 | { |
||
| 20 | use PdoExtractorTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Instantiate PdoExtractor |
||
| 24 | * |
||
| 25 | * @param \PDO $pdo |
||
| 26 | * @param string|null $extractQuery |
||
| 27 | * |
||
| 28 | * @throws NodalFlowException |
||
| 29 | * @throws YaEtlException |
||
| 30 | */ |
||
| 31 | public function __construct(\PDO $pdo, ?string $extractQuery = null) |
||
| 32 | { |
||
| 33 | $this->configurePdo($pdo); |
||
| 34 | |||
| 35 | parent::__construct($extractQuery); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Leave no trace |
||
| 40 | * implement here to allow easier overriding |
||
| 41 | */ |
||
| 42 | public function __destruct() |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * This method sets offset and limit in the query |
||
| 52 | * WARNING : if you set an offset without limit, |
||
| 53 | * the limit will be set to $this->maxdefaultLimit |
||
| 54 | * |
||
| 55 | * @return string the paginated query with current offset and limit |
||
| 56 | */ |
||
| 57 | protected function getPaginatedQuery(): string |
||
| 62 |