Given a key prefix, delete the whole subtrie that starts with the key prefix.

        Key will be encoded into binary array format first.

        It will call `_set` with `if_delete_subtrie` set to True.
161151
def delete_subtrie(self, key):
        
        validate_is_bytes(key)

        self.root_hash = self._set(
            self.root_hash,
            encode_to_bin(key),
            value=b'',
            if_delete_subtrie=True,
        )
674978
def delete(self, key):
        """"""
        if self.servers:
            key = self._qualified_key(key)
            hashed_key = self.key_hasher(key)
            self.client.delete(hashed_key)
511436
def delete(self, key, dir=False, recursive=False,
               prev_value=None, prev_index=None, timeout=None):
        """"""
        url = self.make_key_url(key)
        params = self.build_args({
            'dir': (bool, dir or None),
            'recursive': (bool, recursive or None),
            'prevValue': (six.text_type, prev_value),
            'prevIndex': (int, prev_index),
        })
        try:
            res = self.session.delete(url, params=params, timeout=timeout)
        except:
            self.erred()
        return self.wrap_response(res)
419591
def delete(self):
        
        redis_search_key = ":".join([self.namespace, self.key, "*"])
        keys = self.conn.keys(redis_search_key)
        if keys:
            for key in keys:
                part = key.split(":")[-1]
                self._data.pop(part)
                self.conn.delete(part)

        del self
436792
def decr(self, member, by=1):
        
        return self._client.zincrby(
            self.key_prefix, self._dumps(member), by * -1)
784421
def del_key(self, key, key_to_delete):
        ""
        v = self.get(key)
        if key_to_delete in v:
            del v[key_to_delete]
            self.set(key, v)
425754
def remove_prefix(self, prefix):
        
        self._req('prefix remove %s' % prefix)
        time.sleep(1)
        self._req('netdataregister')
1242838
def decr(self, field, by=1):
        
        return self._client.hincrby(self.key_prefix, field, by * -1)
731401
def delete(self, key):
        
        if not is_string(key):
            raise Exception("Key must be string")

        if len(key) > 32:
            raise Exception("Max key length is 32")

        old_root = copy.deepcopy(self.root_node)
        self.root_node = self._delete_and_delete_storage(
            self.root_node,
            bin_to_nibbles(to_string(key)))
        self.replace_root_hash(old_root, self.root_node)
309787
def delete_all_but(self, prefix, name):
        
        if prefix == name:
            Log.note("{{index_name}} will not be deleted", {"index_name": prefix})
        for a in self.get_aliases():
            # MATCH <prefix>YYMMDD_HHMMSS FORMAT
            if re.match(re.escape(prefix) + "\\d{8}_\\d{6}", a.index) and a.index != name:
                self.delete_index(a.index)
167226
def _clean_up_key(self, key):
        
        for n in self.naughty: key = key.replace(n, '_')
        return key
532548
def delete(self, key):
        
        data = None
        if key is not None:
            data = self.db.delete(key.strip())
        else:
            self.tcex.log.warning(u'The key field was None.')
        return data
36905
public void remove(int key) {
        int i = binarySearch(mKeys, 0, mSize, key);
        if (i >= 0 && mValues[i] != DELETED) {
            mValues[i] = DELETED;
            mGarbage = true;
        }
    }
1251359
def _dict_prefix(self, key, value, i, dj=0, color=None, separator=":"):
        just = self._justify if i > 0 else dj
        key = cut(str(key), self._key_maxlen).rjust(just)
        key = colorize(key, color=color)
        pref = "{}{} {}".format(key, separator, value)
        """"""
        return pref
82216
function prefix (a, b) {
  if(a.length > b.length) return false
  var l = a.length - 1
  var lastA = a[l]
  var lastB = b[l]

  if(typeof lastA !== typeof lastB)
    return false

  if('string' == typeof lastA
    && 0 != lastB.indexOf(lastA))
      return false
  
  //handle cas where there is no key prefix
  //(a hook on an entire sublevel)
  if(a.length == 1 && isArrayLike(lastA)) l ++
  
  while(l--) {
    if(compare(a[l], b[l])) return false
  }
  return true
}
1037427
def _cleanup_keys_with_confirmation(self, keys_to_delete):
    
    print('Round name: ', self.round_name)
    print('Number of entities to be deleted: ', len(keys_to_delete))
    if not keys_to_delete:
      return
    if self.verbose:
      print('Entities to delete:')
      idx = 0
      prev_key_prefix = None
      dots_printed_after_same_prefix = False
      for k in keys_to_delete:
        if idx >= 20:
          print('   ...')
          print('   ...')
          break
        key_prefix = (k.flat_path[0:1]
                      if k.flat_path[0] in [u'SubmissionType', u'WorkType']
                      else k.flat_path[0])
        if prev_key_prefix == key_prefix:
          if not dots_printed_after_same_prefix:
            print('   ...')
          dots_printed_after_same_prefix = True
        else:
          print('  ', k)
          dots_printed_after_same_prefix = False
          idx += 1
        prev_key_prefix = key_prefix
    print()
    inp = input_str('Are you sure? (type "yes" without quotes to confirm): ')
    if inp != 'yes':
      return
    with self.datastore_client.no_transact_batch() as batch:
      for k in keys_to_delete:
        batch.delete(k)
    print('Data deleted')
34883
def decr(self, key, by=1):
        
        return self._client.decr(self.get_key(key), by)