$mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;
$builder = $this->connection->getQueryBuilder();
-
- if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
- $permsFunc = $builder->createFunction(
- 'bitand(' . $builder->getColumnName('permissions') . ', ' . $mask . ')'
- );
- } else {
- $permsFunc = $builder->createFunction(
- '(' . $builder->getColumnName('permissions') . ' & ' . $mask . ')'
- );
- }
+ $permsFunc = $builder->expr()->bitwiseAnd('permissions', $mask);
$builder
->update('share')
->set('permissions', $permsFunc)