connection->getQueryBuilder(); $cleanUpQuery->delete('preferences') ->where($cleanUpQuery->expr()->eq('appid', $cleanUpQuery->createNamedParameter('theming'))) ->andWhere($cleanUpQuery->expr()->orX( $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('background')), $cleanUpQuery->expr()->eq('configkey', $cleanUpQuery->createNamedParameter('backgroundVersion')), )); $cleanUpQuery->executeStatement(); $updateQuery = $this->connection->getQueryBuilder(); $updateQuery->update('preferences') ->set('appid', $updateQuery->createNamedParameter('theming')) ->where($updateQuery->expr()->eq('appid', $updateQuery->createNamedParameter('dashboard'))) ->andWhere($updateQuery->expr()->orX( $updateQuery->expr()->eq('configkey', $updateQuery->createNamedParameter('background')), $updateQuery->expr()->eq('configkey', $updateQuery->createNamedParameter('backgroundVersion')), )); $updateQuery->executeStatement(); } }