@@ -242,6 +242,34 @@ public function aggregate()
242
242
}
243
243
}
244
244
245
+ public function read ($ query , $ params ): PDOStatement
246
+ {
247
+ return $ this ->conn ->read ($ query , $ params );
248
+ }
249
+
250
+ public function isPgsql (): bool
251
+ {
252
+ return $ this ->conn ->getDriver () === 'pgsql ' ;
253
+ }
254
+
255
+ public function isMysql (): bool
256
+ {
257
+ return $ this ->conn ->getDriver () === 'mysql ' ;
258
+ }
259
+
260
+ public function escapeCol ($ col_name ): string
261
+ {
262
+ return $ this ->escape_char . $ col_name . $ this ->escape_char ;
263
+ }
264
+
265
+ public function escapeCols ($ col_names ): string
266
+ {
267
+ return $ this ->escape_char . implode (
268
+ $ this ->escape_char . ', ' . $ this ->escape_char ,
269
+ $ col_names
270
+ ) . $ this ->escape_char ;
271
+ }
272
+
245
273
private function insertLogin ($ entities , $ userId , $ date )
246
274
{
247
275
foreach (Config::SIDES as $ side ) {
@@ -265,11 +293,6 @@ private function insertLogin($entities, $userId, $date)
265
293
}
266
294
}
267
295
268
- private function escapeCol ($ col_name ): string
269
- {
270
- return $ this ->escape_char . $ col_name . $ this ->escape_char ;
271
- }
272
-
273
296
private function writeLogin ($ date , $ ids , $ user ): bool
274
297
{
275
298
if (empty ($ user )) {
@@ -475,14 +498,6 @@ private function prependColon($str): string
475
498
return ': ' . $ str ;
476
499
}
477
500
478
- private function escapeCols ($ col_names ): string
479
- {
480
- return $ this ->escape_char . implode (
481
- $ this ->escape_char . ', ' . $ this ->escape_char ,
482
- $ col_names
483
- ) . $ this ->escape_char ;
484
- }
485
-
486
501
private function getAggregateGroupBy ($ ids ): string
487
502
{
488
503
$ columns = ['day ' ];
@@ -532,21 +547,6 @@ private function getSpName($request)
532
547
return $ displayName ;
533
548
}
534
549
535
- private function read ($ query , $ params ): PDOStatement
536
- {
537
- return $ this ->conn ->read ($ query , $ params );
538
- }
539
-
540
- private function isPgsql (): bool
541
- {
542
- return $ this ->conn ->getDriver () === 'pgsql ' ;
543
- }
544
-
545
- private function isMysql (): bool
546
- {
547
- return $ this ->conn ->getDriver () === 'mysql ' ;
548
- }
549
-
550
550
private function unknownDriver ()
551
551
{
552
552
Logger::error (self ::DEBUG_PREFIX . 'unsupported DB driver \'' . $ this ->conn ->getDriver ());
0 commit comments