Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsplitt3r <splitt3r@users.noreply.github.com>2017-10-08 20:46:44 +0300
committersplitt3r <splitt3r@users.noreply.github.com>2017-10-08 20:46:44 +0300
commit538b786f53123b2a8c6a44859ee0e2f80a89e9bf (patch)
treeb9c586db6959162414cee823ce328ac44238c45e /lib
parentd48fa88a96eed012b4b98f25e1e9c6c56653b716 (diff)
Readded one find for EventMapper
Diffstat (limited to 'lib')
-rw-r--r--lib/Db/EventMapper.php12
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