| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PgSQL |
||
| 8 | { |
||
| 9 | public function __construct(protected $table){} |
||
| 10 | |||
| 11 | public function isTable() |
||
| 12 | { |
||
| 13 | $query = Rudra::get("DSN")->query(" |
||
| 14 | SELECT EXISTS ( |
||
| 15 | SELECT FROM information_schema.tables |
||
| 16 | WHERE table_schema = 'public' |
||
| 17 | AND table_name = '{$this->table}' |
||
| 18 | ); |
||
| 19 | "); |
||
| 20 | |||
| 21 | return $query->fetchColumn(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function writeLog(string $name): void |
||
| 34 | ]); |
||
| 35 | } |
||
| 37 |