1 | <?php |
||
15 | trait PdoExtractorTrait |
||
16 | { |
||
17 | /** |
||
18 | * This is hte default limit applied when no limit |
||
19 | * is set and an offset is set. |
||
20 | * It's 2^31 – 1 = 2147483647 = max 32bit |
||
21 | * Use 2^63 − 1 = 9223372036854775807 = max 64bit |
||
22 | * if your os and dbms are 64bit |
||
23 | * |
||
24 | * @var int |
||
25 | */ |
||
26 | protected $maxdefaultLimit = 2147483647; |
||
27 | |||
28 | /** |
||
29 | * @var \PDO |
||
30 | */ |
||
31 | protected $pdo; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $driverBufferedQuery; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $supportedDrivers = [ |
||
42 | 'mysql' => 'mysql', |
||
43 | 'sqlite' => 'sqlite', |
||
44 | 'pgsql' => 'pgsql', |
||
45 | ]; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $dbDriverName; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | protected $queryBindings; |
||
56 | |||
57 | /** |
||
58 | * leave no trace |
||
59 | */ |
||
60 | public function __destruct() |
||
67 | |||
68 | /** |
||
69 | * @param \PDO $pdo |
||
70 | */ |
||
71 | public function configurePdo(\PDO $pdo) |
||
91 | |||
92 | /** |
||
93 | * @param string $extractQuery which MUST NOT contain the LIMIT/OFFSET bit |
||
94 | * |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function setExtractQuery($extractQuery) |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | protected function getLimitOffsetBit() |
||
119 | } |
||
120 |