Total Complexity | 1 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | abstract class AbstractDriverMetaDatas { |
||
14 | protected $dbInstance; |
||
15 | |||
16 | public function __construct($dbInstance) { |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Returns all table names in the database. |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | abstract public function getTablesName(): array; |
||
26 | |||
27 | /** |
||
28 | * Returns an array of the primary keys field names. |
||
29 | * |
||
30 | * @param string $tableName |
||
31 | * @return array |
||
32 | */ |
||
33 | abstract public function getPrimaryKeys(string $tableName): array; |
||
34 | |||
35 | /** |
||
36 | * Returns the list of foreign keys in a table. |
||
37 | * |
||
38 | * @param string $tableName |
||
39 | * @param string $pkName |
||
40 | * @param string $dbName |
||
41 | * @return array |
||
42 | */ |
||
43 | abstract public function getForeignKeys(string $tableName, string $pkName, ?string $dbName = null): array; |
||
44 | |||
45 | /** |
||
46 | * Returns metadata related to the fields of the specified table. |
||
47 | * |
||
48 | * @param string $tableName |
||
49 | * @return array |
||
50 | */ |
||
51 | abstract public function getFieldsInfos(string $tableName): array; |
||
52 | } |
||
54 |