-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathTimelineEntryMapper.php
More file actions
35 lines (26 loc) · 919 Bytes
/
TimelineEntryMapper.php
File metadata and controls
35 lines (26 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// db/authormapper.php
namespace OCA\TimeTracker\Db;
use OCP\IDBConnection;
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
class TimelineEntryMapper extends CompatibleMapper {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'timetracker_timeline_entry');
}
/**
* @throws \OCP\AppFramework\Db\DoesNotExistException if not found
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result
*/
public function find($id) {
$sql = 'SELECT * FROM `*PREFIX*timetracker_timeline_entry` ' .
'WHERE `id` = ?';
return $this->findEntity($sql, [$id]);
}
/**
*/
public function findTimelineEntries($tid) {
$sql = 'SELECT * FROM `*PREFIX*timetracker_timeline_entry` ' .
'WHERE `timeline_id` = ?';
return $this->findEntities($sql, [$tid]);
}
}