Deletes User ratings.

@param DatabaseInterface $database
769196
private function deleteRatings(DatabaseInterface $database)
    {
        $ids = $database->getCol('SELECT oxid FROM oxratings WHERE oxuserid = ?', [$this->getId()]);
        array_walk($ids, [$this, 'deleteItemById'], \OxidEsales\Eshop\Application\Model\Rating::class);
    }
461602
public function delete( $id ) {
		$this->cacheDeletes++;
		$this->cache->delete( $id );
		unset( $this->inMemoryCache[ $id ] );
	}
314425
public function delete($id)
    {
        $entity = $this->get($id);

        $this->manager->remove($entity);
        $this->manager->flush();
    }
427425
public function delete(TaskInterface $task)
    {
        $this->doDelete($task->getMetadata('RdsMessageId'), [
            'InternalMessageId' => $task->getId(),
            'RdsMessageId' => $task->getMetadata('RdsMessageId')
        ]);
    }
749605
public static function remove(IDb $db, string $sql)
    {
        $hashCode = $db->hashCode();
        if(isset(static::$statements[$hashCode][$sql]))
        {
            unset(static::$statements[$hashCode][$sql]);
        }
    }
966884
public function delete(BlueprintInterface $blueprint)
    {
        Notification::where($this->getAttributes($blueprint))->update(['is_deleted' => true]);
    }
614702
public function destroy($iUserId): bool
    {
        $oDb = Factory::service('Database');

        /**
         * Delete the meta table first as it is the most likely to have FK's on it
         * which might fail as part of the delete.
         */

        $oDb->where('user_id', $iUserId);
        $oDb->delete($this->tableMeta);

        if ((bool) $oDb->affected_rows()) {

            $oDb->where('id', $iUserId);
            $oDb->delete($this->table);

            if ((bool) $oDb->affected_rows()) {
                $this->unsetCacheUser($iUserId);
                return true;
            }
        }

        return false;
    }
546517
public static function delete_data_for_all_users_in_context(context $context) {
        global $DB;
        if ($context->contextlevel != CONTEXT_BLOCK) {
            return;
        }

        // Delete the user preferences.
        $instanceid = $context->instanceid;
        $DB->delete_records_list('user_preferences', 'name', [
            "block{$instanceid}hidden",
            "docked_block_instance_{$instanceid}"
        ]);
    }
231882
@Override
    public void removeUser(int userID) {
        super.removeUser(userID);
        ratingsUser.remove(userID);
        usersStats.remove(userID);
    }
336109
public function deleteUserImage(UserInterface $user)
    {
        $file = $this->getUserImage($user);
        if (is_readable($file)) {
            unlink($file);
        }
    }
1009844
public function deleteUser($userId)
    {
        try {
            return $this->innerGateway->deleteUser($userId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
120259
public function deleteImage(EventInterface $event) {
        $event->getManager()->trigger('db.image.delete');
        $event->getManager()->trigger('storage.image.delete');

        $model = new Model\ArrayModel();
        $model->setData([
            'imageIdentifier' => $event->getRequest()->getImageIdentifier(),
        ]);

        $event->getResponse()->setModel($model);
    }
325700
public function delete($id)
    {
        $query = $this->createQueryBuilder();

        $query->where($this->getPrimaryKey($query), $id);
        $query->delete();
    }
263484
protected function removeFromOthers(EntityInterface $entity) {
		$field = $this->getConfig('field');
		$id = $entity->get('id');
		$conditions = $this->buildConditions($entity);
		$this->_table->updateAll([$field => false], ['id !=' => $id] + $conditions);
	}
1170339
public function instance_deleted() {
        // We can't use purge here that acts upon a collection.
        // Instead we must drop the named database.
        if (!$this->is_ready()) {
            return;
        }
        $database = $this->connection->selectDatabase($this->databasename);
        $database->drop();
        $connection = null;
        $database = null;
        // Explicitly unset things to cause a close.
        $this->collection = null;
        $this->database = null;
        $this->connection = null;
    }
408861
public function deleteBatch(EntityInterface $entity)
    {
        if (is_null($this->deleteBatch)) {
            $this->deleteBatch = WriteRequestBatch::factory($this->dynamoDb);
        }
        $this->deleteBatch->add(new DeleteRequest($this->formatKeyCondition($entity), $this->getEntityTable($entity)));
    }
809225
protected function deleteActionInternal(ModelInterface $entity) {
        $this->setStatusCode(204);
        $delete = new Delete($entity);
        $delete->process($this->getAcl());
    }