aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Db
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/lib/Db')
-rw-r--r--apps/user_status/lib/Db/UserStatus.php7
-rw-r--r--apps/user_status/lib/Db/UserStatusMapper.php7
2 files changed, 8 insertions, 6 deletions
diff --git a/apps/user_status/lib/Db/UserStatus.php b/apps/user_status/lib/Db/UserStatus.php
index 1be35830853..b2da4a9e07a 100644
--- a/apps/user_status/lib/Db/UserStatus.php
+++ b/apps/user_status/lib/Db/UserStatus.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OCA\UserStatus\Db;
use OCP\AppFramework\Db\Entity;
+use OCP\DB\Types;
/**
* Class UserStatus
@@ -73,13 +74,13 @@ class UserStatus extends Entity {
public function __construct() {
$this->addType('userId', 'string');
$this->addType('status', 'string');
- $this->addType('statusTimestamp', 'int');
+ $this->addType('statusTimestamp', Types::INTEGER);
$this->addType('isUserDefined', 'boolean');
$this->addType('messageId', 'string');
$this->addType('customIcon', 'string');
$this->addType('customMessage', 'string');
- $this->addType('clearAt', 'int');
+ $this->addType('clearAt', Types::INTEGER);
$this->addType('isBackup', 'boolean');
- $this->addType('statusMessageTimestamp', 'int');
+ $this->addType('statusMessageTimestamp', Types::INTEGER);
}
}
diff --git a/apps/user_status/lib/Db/UserStatusMapper.php b/apps/user_status/lib/Db/UserStatusMapper.php
index c98f0bf817f..15982d44fd8 100644
--- a/apps/user_status/lib/Db/UserStatusMapper.php
+++ b/apps/user_status/lib/Db/UserStatusMapper.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
namespace OCA\UserStatus\Db;
+use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\QBMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
@@ -83,7 +84,7 @@ class UserStatusMapper extends QBMapper {
/**
* @param string $userId
* @return UserStatus
- * @throws \OCP\AppFramework\Db\DoesNotExistException
+ * @throws DoesNotExistException
*/
public function findByUserId(string $userId, bool $isBackup = false): UserStatus {
$qb = $this->db->getQueryBuilder();
@@ -126,7 +127,7 @@ class UserStatusMapper extends QBMapper {
$qb->expr()->eq('status', $qb->createNamedParameter(IUserStatus::ONLINE))
));
- $qb->execute();
+ $qb->executeStatement();
}
/**
@@ -140,7 +141,7 @@ class UserStatusMapper extends QBMapper {
->where($qb->expr()->isNotNull('clear_at'))
->andWhere($qb->expr()->lte('clear_at', $qb->createNamedParameter($timestamp, IQueryBuilder::PARAM_INT)));
- $qb->execute();
+ $qb->executeStatement();
}