updates the info doc for a key
169508
function( key, info, callback ){
    this.log.debug('Updating info %s %s', key, info.status);
    this._query("update " + this.infoTable + " set info = '" + JSON.stringify(info) + "' where id = '"+key+":info'", function(err, result){
      if ( err || !result ){
        callback('Key Not Found ' + key, null);
      } else {
        callback(null, true);
      }
    });
  }
370614
def _hook_id(self, info):
        
        if isinstance(info, dict) and 'id' in info.keys():
            self.id = info['id']
1248930
def update(self, title, key):
        
        json = None
        if title and key:
            data = {'title': title, 'key': key}
            json = self._json(self._patch(self._api, data=dumps(data)), 200)
        if json:
            self._update_(json)
            return True
        return False
596014
def _update(collection_name, upsert, multi, spec, doc, check_keys, opts):
    """"""
    flags = 0
    if upsert:
        flags += 1
    if multi:
        flags += 2
    encode = _dict_to_bson  # Make local. Uses extensions.
    encoded_update = encode(doc, check_keys, opts)
    return b"".join([
        _ZERO_32,
        _make_c_string(collection_name),
        _pack_int(flags),
        encode(spec, False, opts),
        encoded_update]), len(encoded_update)
981402
def update_info(self, info):
        

        for key in self._info_fields:

            value = getattr(self, key, None)
            idx = _get_info(info, self.name)

            existing_value = idx.get(key)
            if key in idx and value is not None and existing_value != value:

                # frequency/name just warn
                if key in ['freq', 'index_name']:
                    ws = attribute_conflict_doc % (key, existing_value, value)
                    warnings.warn(ws, AttributeConflictWarning, stacklevel=6)

                    # reset
                    idx[key] = None
                    setattr(self, key, None)

                else:
                    raise ValueError(
                        "invalid info for [{name}] for [{key}], "
                        "existing_value [{existing_value}] conflicts with "
                        "new value [{value}]".format(
                            name=self.name, key=key,
                            existing_value=existing_value, value=value))
            else:
                if value is not None or existing_value is not None:
                    idx[key] = value

        return self
319747
function updateInfo(info, override, source, sourceId) {
  if (source) {
    if (source.minzoom !== undefined) {
      // eslint-disable-next-line no-param-reassign
      info.minzoom = source.minzoom;
    }
    if (source.maxzoom !== undefined) {
      // eslint-disable-next-line no-param-reassign
      info.maxzoom = source.maxzoom;
    }
  }
  if (sourceId !== undefined) {
    // eslint-disable-next-line no-param-reassign
    info.name = sourceId;
  }
  if (override) {
    _.each(override, (v, k) => {
      if (v === null) {
        // When override.key == null, delete that key
        // eslint-disable-next-line no-param-reassign
        delete info[k];
      } else {
        // override info of the parent
        // eslint-disable-next-line no-param-reassign
        info[k] = v;
      }
    });
  }
}
1151221
def update(key, value):
    '''
    
    '''
    store = load()
    store[key] = value
    dump(store)
    return True
730341
def update(access_key, resource_policy, is_admin, is_active,  rate_limit):
    '''
    
    '''
    with Session() as session:
        try:
            data = session.KeyPair.update(
                access_key,
                is_active=is_active,
                is_admin=is_admin,
                resource_policy=resource_policy,
                rate_limit=rate_limit)
        except Exception as e:
            print_error(e)
            sys.exit(1)
        if not data['ok']:
            print_fail('KeyPair creation has failed: {0}'.format(data['msg']))
            sys.exit(1)
        print('Key pair is updated: ' + access_key + '.')
910381
def changememokey(ctx, key, account):
    
    print_tx(ctx.bitshares.update_memo_key(key, account=account))
1084557
public final void updateKey(String key) throws IOException {
    Objects.requireNonNull(key, "old key required");
    if (index.containsKey(key)) {
      MtasSolrStatus status = index.get(key);
      index.remove(key);
      if (!index.containsKey(status.key())) {
        index.put(status.key(), status);
      } else {
        throw new IOException("key already exists");
      }
    }
  }
275769
def update(self, **kwargs):
        ""
        kw = dict(index=self.name, doc_type=self.doc_type, ignore=[404])
        kw.update(**kwargs)
        return self._client.update(**kw)
272155
def update_stat(self, mode='open', infostr='', stat=''):
        
        self._update_stat[mode](mode, infostr, stat)
1134892
def cli(ctx, id_number, new_key, metadata=""):
    
    return ctx.gi.cannedkeys.update_key(id_number, new_key, metadata=metadata)
1269420
def update_keys(self):
        """"""
        from ...main import add_api_key
        add_api_key("reddit_api_user_agent", self.reddit_api_user_agent.get())
        add_api_key("reddit_api_client_id", self.reddit_api_client_id.get())
        add_api_key("reddit_api_client_secret", self.reddit_api_client_secret.get())
686657
async def update(self):
    '''
    
    '''
    keys = self.extras.keys()
    self.extras = {}
    for key in keys:
      try:
        func = getattr(self, key, None)
        if callable(func):
          func()
      except:
        pass
1258709
def update_info(user_id, newemail, extinfo=None):
        '''
        
        '''

        if extinfo is None:
            extinfo = {}

        out_dic = {'success': False, 'code': '00'}
        if not tools.check_email_valid(newemail):
            out_dic['code'] = '21'
            return out_dic
        cur_info = MUser.get_by_uid(user_id)
        cur_extinfo = cur_info.extinfo
        for key in extinfo:
            cur_extinfo[key] = extinfo[key]

        try:
            entry = TabMember.update(
                user_email=newemail,
                extinfo=cur_extinfo
            ).where(
                TabMember.uid == user_id
            )
            entry.execute()

            out_dic['success'] = True
        except:
            out_dic['code'] = '91'

        return out_dic
980753
def apply_update(self, doc, update_spec):
        """"""
        # Replace a whole document
        if not '$set' in update_spec and not '$unset' in update_spec:
            # update_spec contains the new document.
            # Update the key in Solr based on the unique_key mentioned as
            # parameter.
            update_spec['_id'] = doc[self.unique_key]
            return update_spec
        for to_set in update_spec.get("$set", []):
            value = update_spec['$set'][to_set]
            # Find dotted-path to the value, remove that key from doc, then
            # put value at key:
            keys_to_pop = []
            for key in doc:
                if key.startswith(to_set):
                    if key == to_set or key[len(to_set)] == '.':
                        keys_to_pop.append(key)
            for key in keys_to_pop:
                doc.pop(key)
            doc[to_set] = value
        for to_unset in update_spec.get("$unset", []):
            # MongoDB < 2.5.2 reports $unset for fields that don't exist within
            # the document being updated.
            keys_to_pop = []
            for key in doc:
                if key.startswith(to_unset):
                    if key == to_unset or key[len(to_unset)] == '.':
                        keys_to_pop.append(key)
            for key in keys_to_pop:
                doc.pop(key)
        return doc