| Total Complexity | 7 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class SqliteDriverMetas extends AbstractDriverMetaDatas { |
||
| 14 | |||
| 15 | public function getForeignKeys($tableName, $pkName, $dbName = null): array { |
||
| 16 | $recordset = $this->dbInstance->query ( "SELECT \"TABLE\" as TABLE_NAME , \"to\" as COLUMN_NAME , \"from\" as REFERENCED_TABLE_SCHEMA FROM pragma_foreign_key_list('".$tableName."') WHERE \"to\"='".$pkName."';"); |
||
| 17 | return $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getTablesName(): array { |
||
| 21 | $query = $this->dbInstance->query ( 'SELECT name FROM sqlite_master WHERE type=\'table\';' ); |
||
| 22 | return $query->fetchAll ( \PDO::FETCH_COLUMN ); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getPrimaryKeys($tableName): array { |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getFieldsInfos($tableName): array { |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 |