db->getQueryBuilder(); $qb->select('*') ->from(self::TABLENAME) ->where($qb->expr()->eq('subscription_id', $qb->createNamedParameter($subscriptionId, IQueryBuilder::PARAM_INT))); return $this->findEntity($qb); } /** * @param string $pushResource * @return Entity|WebPushSubscription * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException * @throws DoesNotExistException */ public function findByPushResource(string $pushResource): Subscription { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); $qb->select('*') ->from(self::TABLENAME) ->where($qb->expr()->eq('push_resource', $qb->createNamedParameter($pushResource))); return $this->findEntity($qb); } }