Shortcut for commands that remove all values of the field.
        All will be deindexed.
482838
def _del(self, command, *args, **kwargs):
        
        if self.indexable:
            self.deindex()
        return self._traverse_command(command, *args, **kwargs)
1256995
def unsetrange(self, keys=None, prefix=""):
        
        if keys is not None:
            keys = ['%s%s' % (prefix, key) for key in keys]
            self.cursor.execute('delete from kv where key in (%s)' % ','.join(['?'] * len(keys)), keys)
            if self.revision and self.cursor.rowcount:
                self.cursor.execute(
                    'insert into kv_revisions values %s' % ','.join(['(?, ?, ?)'] * len(keys)),
                    list(itertools.chain.from_iterable((key, self.revision, json.dumps('DELETED')) for key in keys)))
        else:
            self.cursor.execute('delete from kv where key like ?',
                                ['%s%%' % prefix])
            if self.revision and self.cursor.rowcount:
                self.cursor.execute(
                    'insert into kv_revisions values (?, ?, ?)',
                    ['%s%%' % prefix, self.revision, json.dumps('DELETED')])
1158374
def remove_all_for(self, key):
        
        if not isinstance(key, _string_type):
            raise TypeError("Key need to be a string.")

        for idx in _range(self.__kcount[key]):
            super(VDFDict, self).__delitem__((idx, key))

        self.__omap = list(filter(lambda x: x[1] != key, self.__omap))

        del self.__kcount[key]
1342831
def revoke_all(cls, cur, schema_name, roles):
        
        cur.execute('REVOKE ALL ON SCHEMA {0} FROM {1};'
                    'REVOKE ALL ON ALL TABLES IN SCHEMA {0} FROM {1};'
                    'REVOKE ALL ON ALL SEQUENCES IN SCHEMA {0} FROM {1};'
                    'REVOKE ALL ON ALL FUNCTIONS IN SCHEMA {0} FROM {1};'.format(schema_name, roles))
136601
public function wipeAll() {
		foreach($this->getTables() as $t) {
			foreach($this->getKeys($t) as $k) {
				$this->adapter->exec("ALTER TABLE \"{$k['FKTABLE_NAME']}\" DROP FOREIGN KEY \"{$k['FK_NAME']}\"");
			}
			$this->adapter->exec("DROP TABLE \"$t\"");
		}
		
	}
165659
def ClearAllVar(self):
    """"""
    self.value = None
    # Call OnClearAllVar on options.
    _ = [option.OnClearAllVar() for option in self.options]
426489
def _clean_pivot_attributes(self, model):
        
        values = {}
        delete_keys = []

        for key, value in model.get_attributes().items():
            if key.find('pivot_') == 0:
                values[key[6:]] = value

                delete_keys.append(key)

        for key in delete_keys:
            delattr(model, key)

        return values
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
596729
def del_fields(self, *names):
        """"""
        cls = type(self)
        self.__class__ = cls
        for n in names:
            # don't raise error if a field is absent
            if isinstance(getattr(cls, n, None), DataField):
                if n in self._field_values:
                    del self._field_values[n]
                delattr(cls, n)
964395
function updatedec(){
  var dec = decinputfield;
  if(decinputvalue != dec){
    updateall(decinputtobin(dec));
    clearallinputs();
    decinputfield = dec;
    decinputvalue = dec;
  }
}
197606
def _clean_fields(self, omit_fields, sparse_fields, next_level_omits):
        
        sparse = len(sparse_fields) > 0
        to_remove = []

        if not sparse and len(omit_fields) == 0:
            return

        for field_name in self.fields:
            is_present = self._should_field_exist(
                field_name, omit_fields, sparse_fields, next_level_omits
            )

            if not is_present:
                to_remove.append(field_name)

        for remove_field in to_remove:
            self.fields.pop(remove_field)
1104015
def remove_all(self):
        """"""
        names = sorted(self._actions_dict.keys())
        for name in names:
            self.remove(name)
675999
def deleteRecords( fieldNameToTest = nil, test = nil, fieldValueToTest = nil)
      numRecsDeleted = 0
      if @dbid and @fields and fieldNameToTest and test and fieldValueToTest

         numRecs = _getNumRecords

         if numRecs > "0"

            fieldNameToTestID = lookupFieldIDByName( fieldNameToTest )
            fieldToTest = lookupField( fieldNameToTestID ) if fieldNameToTestID
            fieldType = fieldToTest.attributes[ "field_type" ] if fieldToTest

            if fieldNameToTestID
               (1..numRecs.to_i).each{ |rid|
                  _getRecordInfo( rid.to_s )
                  if @num_fields and @update_id and @field_data_list
                     field_data = lookupFieldData( fieldNameToTestID )
                     if field_data and field_data.is_a?( REXML::Element )
                        valueElement = field_data.elements[ "value" ]
                        value = valueElement.text if valueElement.has_text?
                        value = formatFieldValue( value, fieldType )
                        match = eval( "\"#{value}\" #{test} \"#{fieldValueToTest}\"" ) if value
                        if match
                           if _deleteRecord( rid.to_s )
                              numRecsDeleted += 1
                           end
                        end
                     end
                  end
               }
            end
         end
      elsif @dbid
         numRecsDeleted = _purgeRecords
      end
      numRecsDeleted
   end
56465
def remove_values(self, keys):
        """"""
        data = self.model.get_data()
        for key in sorted(keys, reverse=True):
            data.pop(key)
            self.set_data(data)
195253
def clear(self):
        """"""
        for i, value in enumerate(self.buffer):
            self.buffer[i] = 0
932352
def discard(self, val):
        
        _maxes = self._maxes

        if not _maxes:
            return

        pos = bisect_left(_maxes, val)

        if pos == len(_maxes):
            return

        _lists = self._lists
        idx = bisect_left(_lists[pos], val)

        if _lists[pos][idx] == val:
            self._delete(pos, idx)
492016
def clean(self, value):
        """"""
        if not value:
            return None

        # if any value exists, then add "0" as a placeholder to the remaining
        # values.
        if isinstance(value, list) and any(value):
            for i, item in enumerate(value):
                if not item:
                    value[i] = '0'

        return super(MultipleDecimalField, self).clean(value)