Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function getFieldsInfos($tableName): array { |
||
38 | $fieldsInfos = array (); |
||
39 | $recordset = $this->dbInstance->query ( "PRAGMA TABLE_INFO(".$table_name.");" ); |
||
40 | $fields = $recordset->fetchAll ( \PDO::FETCH_ASSOC ); |
||
41 | foreach ( $fields as $field ) { |
||
42 | $fieldsInfos [$field ['name']] = [ "Type" => $field ['type'],"Nullable" => $field ["notnull"] ]; |
||
43 | } |
||
44 | return $fieldsInfos; |
||
45 | } |
||
48 |