Deletes the records in the current QuerySet.
498176
def delete(self):
        
        assert self.query.can_filter(), "Cannot use 'limit' or 'offset' with delete."

        del_query = self._clone()

        # Disable non-supported fields.
        del_query.query.clear_ordering()

        return del_query.query.delete()
1327948
def removeDataset(self, dataset):
        
        for datasetRecord in models.Dataset.select().where(
                        models.Dataset.id == dataset.getId()):
            datasetRecord.delete_instance(recursive=True)
311786
def delete_all(self, model_class):
        '''
        '''
        assert hasattr(model_class, '_fields'), 'Not a valid model class'

        table = model_class.__name__.lower()
        with Session() as conn:
            SQL = f'DELETE FROM {table}'
            conn.cursor().execute(SQL)
            conn.commit()
372386
public void doRemove() throws DBException
    {
        super.doRemove();
        if (m_arrayCache != null)
            if (m_iLogicalIndex != -1)
                m_arrayCache.set(m_iLogicalIndex, null);    // Show the current record as deleted.
    }
789979
public function clear(){
			$this->setFields('');
			$this->setSet('');
			$this->setLimit('');
			$this->setWhere('');
			$this->setOrderBy('');
			$this->setGroupBy('');
			$this->setRecords('');
			$this->setQuery('');
		}
198835
def clear(self):
        "
        self.bad = False
        self.errors = {}
        self._collection.clear()
182035
def delete(self) -> "DeleteQuery":
        
        return DeleteQuery(
            db=self._db,
            model=self.model,
            q_objects=self._q_objects,
            annotations=self._annotations,
            custom_filters=self._custom_filters,
        )
299848
public void clear() {
        documentsByEntity.clear();
        deletedEntities.clear();
        documentsById.clear();
        _knownMissingIds.clear();
        if (_countersByDocId != null) {
            _countersByDocId.clear();
        }
    }
1059011
public void clear() {
		Mutator<K> mutator = HFactory.createMutator(this.keyspace, this.keySerializer, new BatchSizeHint(1, this.mutateInterval));

		SliceCounterQuery<K, N> query = HFactory.createCounterSliceQuery(this.keyspace, this.keySerializer, this.nameSerializer).
						setColumnFamily(this.cf).
						setKey(this.rowKey);

		SliceCounterIterator<K, N> iterator =
						new SliceCounterIterator<K, N>(query, null, (N) null, false, this.count);

		while(iterator.hasNext()) {
			HCounterColumn<N> column = iterator.next();
			mutator.incrementCounter(this.rowKey, this.cf, column.getName(), column.getValue() * -1);
		}

		mutator.execute();
	}
1137634
def purgeRecords( dbid, query = nil, qid = nil, qname = nil )
      @dbid = dbid
      xmlRequestData = getQueryRequestXML( query, qid, qname )
      sendRequest( :purgeRecords, xmlRequestData )
      @num_records_deleted = getResponseValue( :num_records_deleted )

      return self if @chainAPIcalls
      @num_records_deleted
   end
78254
def remove(self, db):
        
        assert self.collection
        assert self.id

        db[self.collection].remove(self.id)
829261
async def clear(self, using_db=None) -> None:
        
        db = using_db if using_db else self.model._meta.db
        through_table = Table(self.field.through)
        query = (
            db.query_class.from_(through_table)
            .where(getattr(through_table, self.field.backward_key) == self.instance.id)
            .delete()
        )
        await db.execute_query(str(query))
1292423
def delete_record(self, record):
        
        self.children.remove(record.resource)
        record.delete()
995090
public function delete()
    {
        if (!$this->_canKept) {
            $this->forceDelete();
        } else {
            Query::table(static::$table)
            ->set('deleted_at', Time::current())
            ->where($this->_keyName, '=', $this->_keyValue)
            ->update();
        }
    }
21646
def delete(self):
        
        # Delete each field
        for field_name in self._fields:
            field = self.get_field(field_name)
            if not isinstance(field, PKField):
                # pk has no stored key
                field.delete()
        # Remove the pk from the model collection
        self.connection.srem(self.get_field('pk').collection_key, self._pk)
        # Deactivate the instance
        delattr(self, "_pk")
398364
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        return self._change_record_sets('DELETE', rtype, name, content)
246487
def delete(self, records, context):
        
        # include various schema records to remove
        DELETE = self.statement('DELETE')
        sql, data = DELETE(records, context)

        if context.dryRun:
            print sql % data
            return 0
        else:
            return self.execute(sql, data, writeAccess=True)