diff options
author | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-08 20:46:44 +0300 |
---|---|---|
committer | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-08 20:46:44 +0300 |
commit | 538b786f53123b2a8c6a44859ee0e2f80a89e9bf (patch) | |
tree | b9c586db6959162414cee823ce328ac44238c45e /lib | |
parent | d48fa88a96eed012b4b98f25e1e9c6c56653b716 (diff) |
Readded one find for EventMapper
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/EventMapper.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Db/EventMapper.php b/lib/Db/EventMapper.php index f0156e67..a9bf0406 100644 --- a/lib/Db/EventMapper.php +++ b/lib/Db/EventMapper.php @@ -39,6 +39,18 @@ class EventMapper extends Mapper } /** + * @param int $id + * @throws \OCP\AppFramework\Db\DoesNotExistException if not found + * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result + * @return Event + */ + public function find($id) + { + $sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE id = ?'; + return $this->findEntity($sql, [$id]); + } + + /** * @param $hash * @param int $limit * @param int $offset |