aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/backgroundjob/joblist.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-02-29 09:44:40 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-02-29 09:44:40 +0100
commit2a0cda74d41ece6bee48024dd485bf08087054ad (patch)
tree8c3e8b30d3db45d3c17de189188f15aa7062cf81 /lib/private/backgroundjob/joblist.php
parent6526c122afa2c141f4cd5ffd7e292f7a5556cf61 (diff)
downloadnextcloud-server-2a0cda74d41ece6bee48024dd485bf08087054ad.tar.gz
nextcloud-server-2a0cda74d41ece6bee48024dd485bf08087054ad.zip
Use IQueryBuilder::PARAM_* instead of \PDO::PARAM_*
Diffstat (limited to 'lib/private/backgroundjob/joblist.php')
-rw-r--r--lib/private/backgroundjob/joblist.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index 2920cb5214c..b8230fca4de 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -28,6 +28,7 @@ use OCP\AppFramework\QueryException;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\IJobList;
use OCP\AutoloadNotAllowedException;
+use OCP\DB\QueryBuilder\IQueryBuilder;
class JobList implements IJobList {
/** @var \OCP\IDBConnection */
@@ -69,7 +70,7 @@ class JobList implements IJobList {
->values([
'class' => $query->createNamedParameter($class),
'argument' => $query->createNamedParameter($argument),
- 'last_run' => $query->createNamedParameter(0, \PDO::PARAM_INT),
+ 'last_run' => $query->createNamedParameter(0, IQueryBuilder::PARAM_INT),
]);
$query->execute();
}
@@ -102,7 +103,7 @@ class JobList implements IJobList {
protected function removeById($id) {
$query = $this->connection->getQueryBuilder();
$query->delete('jobs')
- ->where($query->expr()->eq('id', $query->createNamedParameter($id, \PDO::PARAM_INT)));
+ ->where($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT)));
$query->execute();
}
@@ -171,7 +172,7 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->where($query->expr()->gt('id', $query->createNamedParameter($lastId, \PDO::PARAM_INT)))
+ ->where($query->expr()->gt('id', $query->createNamedParameter($lastId, IQueryBuilder::PARAM_INT)))
->orderBy('id', 'ASC')
->setMaxResults(1);
$result = $query->execute();
@@ -216,7 +217,7 @@ class JobList implements IJobList {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('jobs')
- ->where($query->expr()->eq('id', $query->createNamedParameter($id, \PDO::PARAM_INT)));
+ ->where($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT)));
$result = $query->execute();
$row = $result->fetch();
$result->closeCursor();
@@ -286,8 +287,8 @@ class JobList implements IJobList {
public function setLastRun($job) {
$query = $this->connection->getQueryBuilder();
$query->update('jobs')
- ->set('last_run', $query->createNamedParameter(time(), \PDO::PARAM_INT))
- ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId(), \PDO::PARAM_INT)));
+ ->set('last_run', $query->createNamedParameter(time(), IQueryBuilder::PARAM_INT))
+ ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId(), IQueryBuilder::PARAM_INT)));
$query->execute();
}
}