Delete records
https://cybozudev.zendesk.com/hc/ja/articles/201941794

@param integer $appId
@param array $ids
@param integer $guestSpaceId
@param array $revisions
@return array
191696
public function delete($appId, array $ids, $guestSpaceId = null, array $revisions = []): array
    {
        $options = ['json' => ['app' => $appId, 'ids' => $ids]];
        if (count($revisions) && count($ids) === count($revisions)) {
            $options['json']['revisions'] = $revisions;
        }

        /** @var JsonStream $stream */
        $stream = $this->client
            ->delete(KintoneApi::generateUrl('records.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
286081
public function deleteDependents(Event $event, $ids, $count) {
        $rfk = $this->getRelatedForeignKey();

        $this->query(Query::UPDATE)->where($rfk, $ids)->save([$rfk => null]);
    }
945562
public function deleteById($appId, $scanId, $libraryId, array $queryParams = [])
    {
        if (is_null($appId) || is_null($scanId) || is_null($libraryId)) {
            throw new LibException('appId, scanId, or libraryId is null');
        }

        $response = $this->client->delete($this->uri($appId, $scanId, $libraryId), [
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
799713
static function removeEvents( $events = false, $id = false, $version = false )
    {
        if ( is_array( $events ) )
        {
            $db = eZDB::instance();
            $db->begin();
            foreach( $events as $event )
            {
                $event->remove();
            }
            $db->commit();
        }
        else
        {
            $condArray = array();
            if ( $version !== false )
            {
                $condArray['version'] = $version;
            }
            if ( $id !== false )
            {
                $condArray['workflow_id'] = $id;
            }
            eZPersistentObject::removeObject( eZWorkflowEvent::definition(),
                                              $condArray );
        }
    }
435260
public function deleteAppScripts(int $appId, int $pageType) : bool
    {
        Assert::that($appId)->greaterThan(0, 'The $appId has to be positive');
        return (bool)$this->master->doRequest(
            'DELETE',
            sprintf(
                '/admin/WEBAPI/Endpoints/v1_0/PluginService/{KEY}/DeleteAppScriptForPage?appId=%s&pageType=%s',
                $appId,
                $pageType
            )
        );
    }
1161836
public function putLayout($id, array $layout, $guestSpaceId = null, $revision = -1): array
    {
        $options = ['json' => [
            'app' => $id,
            'layout' => $layout,
            'revision' => $revision
        ]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->put(KintoneApi::generateUrl('preview/app/form/layout.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
1151552
final public function deleteByPks(array $ids)
    {
        foreach ($ids as $id) {
            if (!$this->deleteByPk($id)) {
                return false;
            }
        }

        return true;
    }
533498
protected function delete_dimensions(array $ids) {
        global $DB;

        $fs = get_file_storage();
        foreach ($ids as $id) {
            if (!empty($id)) {   // to prevent accidental removal of all files in the area
                $fs->delete_area_files($this->workshop->context->id, 'workshopform_rubric', 'description', $id);
            }
        }
        $DB->delete_records_list('workshopform_rubric', 'id', $ids);
    }
1014040
public function deleted(UserInvitation $invitation)
    {
        // Insert into 'revisions' (calling getTable probably not necessary, but to be safe).
        \DB::table((new Revision())->getTable())->insert([
            [
                'revisionable_type' => $invitation->getMorphClass(),
                'revisionable_id' => $invitation->id,
                'key' => 'deleted_at',
                'old_value' => null,
                'new_value' => new \DateTime(),
                'user_id' => (\Auth::check() ? \Auth::user()->id : null),
                'created_at' => new \DateTime(),
                'updated_at' => new \DateTime(),
            ]
        ]);
    }
1094135
public function deleteFromRevision( Revision $revision, array $extraParams = [] ) {
		$this->api->postRequest( new SimpleRequest(
			'delete',
			$this->getDeleteParams( $revision->getPageIdentifier(), $extraParams )
		) );
		return true;
	}
537783
public function deleteDocuments($indexName, $indexType, array $ids)
    {
        $index = $this->getIndex($indexName);
        $type = $index->getType($indexType);

        return $this->getClient()->deleteIds($ids, $index, $type);
    }
20260
public function get($appId, $recordId, $order = 'desc', $offset = 0, $limit = 10, $guestSpaceId = null): array
    {
        $options = ['json' => [
            'app' => $appId,
            'record' => $recordId,
            'order' => $order,
            'offset' => $offset,
            'limit' => $limit
        ]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->get(KintoneApi::generateUrl('record/comments.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize()['comments'];
    }
661200
public function deleteViaIds($ids)
    {
        return !$ids ||
        \Yii::$app->db->createCommand()->delete(
            $this->viaTable,
            array_merge($this->condition, [reset($this->relationAttribute) => $ids])
        )->execute();
    }
1184152
def delete(self, ids):
        
        url = build_uri_with_ids('api/v3/vrf/%s/', ids)

        return super(ApiVrf, self).delete(url)
735710
public function delete($documentId, $rev)
    {
        $context = array('http' => array());
        $context['http']['method'] = 'DELETE';

        list($status, $response) = $this->sendRequest($documentId . '?rev=' . $rev, $context);
        unset($response);

        if ($status != 200) {
            throw new Exception\Response('DELETE - Unknown response status.');
        }

        if ($this->getCache($documentId)) {
            unset($this->cache[$documentId]);
        }

        return true;
    }
237787
public function delete($appUserId, $id)
    {
        $url = sprintf('users/%s/bankaccounts/%s', $appUserId, $id);
        return $this->deleteObject($url);
    }
964507
def action_delete(self, ids):
        """"""
        is_current = any(SessionActivity.is_current(sid_s=id_) for id_ in ids)
        if is_current:
            flash('You could not remove your current session', 'error')
            return
        for id_ in ids:
            delete_session(sid_s=id_)
        db.session.commit()