Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
CrashReportDomainDao | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
selectCrashReportsDetail | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Models\Dao\Domain; |
6 | |
7 | use Exception; |
8 | use PeServer\App\Models\Cache\PluginCache; |
9 | use PeServer\App\Models\Cache\PluginCacheCategory; |
10 | use PeServer\App\Models\Cache\PluginCacheItem; |
11 | use PeServer\App\Models\Data\Dto\CrashReportDetailDto; |
12 | use PeServer\App\Models\Domain\PluginUrlKey; |
13 | use PeServer\Core\Collection\Collections; |
14 | use PeServer\Core\Database\DaoBase; |
15 | use PeServer\Core\Database\DaoTrait; |
16 | use PeServer\Core\Database\IDatabaseContext; |
17 | |
18 | class CrashReportDomainDao extends DaoBase |
19 | { |
20 | use DaoTrait; |
21 | |
22 | #region function |
23 | |
24 | public function selectCrashReportsDetail(int $sequence): CrashReportDetailDto |
25 | { |
26 | $result = $this->context->querySingle( |
27 | <<<SQL |
28 | |
29 | select |
30 | crash_reports.*, |
31 | nullif(crash_report_comments.comment, '') as developer_comment |
32 | from |
33 | crash_reports |
34 | left join |
35 | crash_report_comments |
36 | on |
37 | ( |
38 | crash_report_comments.crash_report_sequence = crash_reports.sequence |
39 | ) |
40 | where |
41 | crash_reports.sequence = :sequence |
42 | |
43 | SQL, |
44 | [ |
45 | 'sequence' => $sequence, |
46 | ] |
47 | ); |
48 | |
49 | return $result->mapping(CrashReportDetailDto::class); |
50 | } |
51 | |
52 | #endregion |
53 | } |