Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | protected function getPrimaryKey(string $className): array |
||
55 | { |
||
56 | $qw = new QueryWrapper(); |
||
57 | $qw->setRawSql("SHOW COLUMNS FROM `".addslashes($className)."` WHERE `Key` = 'PRI'"); |
||
58 | $rows = $qw->all(); |
||
59 | |||
60 | /** @var array<string> $result */ |
||
61 | $result = []; |
||
62 | foreach($rows as $row) { |
||
63 | $result[] = $row['Field']; |
||
64 | } |
||
65 | |||
66 | return $result; |
||
67 | } |
||
69 |