lib/private/BackgroundJob/JobList.php 1 location
|
@@ 224-238 (lines=15) @@
|
221 |
|
* @param int $id |
222 |
|
* @return IJob|null |
223 |
|
*/ |
224 |
|
public function getById($id) { |
225 |
|
$query = $this->connection->getQueryBuilder(); |
226 |
|
$query->select('*') |
227 |
|
->from('jobs') |
228 |
|
->where($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT))); |
229 |
|
$result = $query->execute(); |
230 |
|
$row = $result->fetch(); |
231 |
|
$result->closeCursor(); |
232 |
|
|
233 |
|
if ($row) { |
234 |
|
return $this->buildJob($row); |
235 |
|
} else { |
236 |
|
return null; |
237 |
|
} |
238 |
|
} |
239 |
|
|
240 |
|
/** |
241 |
|
* get the job object from a row in the db |
apps/federatedfilesharing/lib/FederatedShareProvider.php 1 location
|
@@ 808-825 (lines=18) @@
|
805 |
|
* @return array |
806 |
|
* @throws ShareNotFound |
807 |
|
*/ |
808 |
|
private function getRawShare($id) { |
809 |
|
|
810 |
|
// Now fetch the inserted share and create a complete share object |
811 |
|
$qb = $this->dbConnection->getQueryBuilder(); |
812 |
|
$qb->select('*') |
813 |
|
->from($this->shareTable) |
814 |
|
->where($qb->expr()->eq('id', $qb->createNamedParameter($id))); |
815 |
|
|
816 |
|
$cursor = $qb->execute(); |
817 |
|
$data = $cursor->fetch(); |
818 |
|
$cursor->closeCursor(); |
819 |
|
|
820 |
|
if ($data === false) { |
821 |
|
throw new ShareNotFound; |
822 |
|
} |
823 |
|
|
824 |
|
return $data; |
825 |
|
} |
826 |
|
|
827 |
|
/** |
828 |
|
* Create a share object from an database row |