diff options
author | anoy <anoymouserver+github@mailbox.org> | 2020-10-04 17:25:25 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2020-10-04 21:35:31 +0200 |
commit | bfcf38a4806800d8d9b19161670369a30739c4a2 (patch) | |
tree | 0706b711eca45e49da863613084d895e77ff1645 /lib/Db | |
parent | 0fe63840854c185b40b0f788e227ef44ca5bb157 (diff) |
update only relevant item fields
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/ItemMapperV2.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Db/ItemMapperV2.php b/lib/Db/ItemMapperV2.php index 222340744..54d9ecbaf 100644 --- a/lib/Db/ItemMapperV2.php +++ b/lib/Db/ItemMapperV2.php @@ -16,6 +16,7 @@ use Doctrine\DBAL\FetchMode; use OCA\News\Utility\Time; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\Entity; +use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; @@ -95,6 +96,16 @@ class ItemMapperV2 extends NewsMapperV2 return $this->findEntity($builder); } + /** + * Find an item by a GUID hash. + * + * @param string $guidHash hash to find with + * + * @return Item|Entity + * + * @throws DoesNotExistException + * @throws MultipleObjectsReturnedException + */ public function findByGuidHash(string $guidHash): Item { $builder = $this->db->getQueryBuilder(); |