update data call back hook
438281
function pongListUpdateData( divId, paramsObj ) {
  log( "PoNG-List",  'update '+divId );
  var tblDef = poTbl[ divId ].pongTableDef;

  if ( poTbl[ divId ].resourceURL != '-' ) {
    
    $.getJSON( tblDef.dataUrlFull, paramsObj ,
      function( data ) {  
        log( "PoNG-List",  JSON.stringify( data ) );
        var subdata = getSubData( data, tblDef.dataDocSubPath );
        pongListSetData( divId, subdata ); 
        publishEvent( 'feedback', {'text':'List data loaded sucessfully'} )
      } 
    ).fail( 
        function() { publishEvent( 'feedback', {'text':'List service offline? Config OK?'} ) } 
    );
    
  }
}
467564
def update(callback=None, path=None, method=Method.PUT, resource=None, tags=None, summary="Update specified resource.",
           middleware=None):
    # type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
    
    def inner(c):
        op = ResourceOperation(c, path or PathParam('{key_field}'), method, resource, tags, summary, middleware)
        op.responses.add(Response(HTTPStatus.NO_CONTENT, "{name} has been updated."))
        op.responses.add(Response(HTTPStatus.BAD_REQUEST, "Validation failed.", Error))
        op.responses.add(Response(HTTPStatus.NOT_FOUND, "Not found", Error))
        return op
    return inner(callback) if callback else inner
60636
def __update_existing(self, msg, req):
        """"""
        req._messages.append(msg)

        payload = msg[M_PAYLOAD]
        if msg[M_TYPE] in _RSP_TYPE_CREATION:
            if payload[P_RESOURCE] == R_SUB:
                # Add callback for feeddata
                with self.__pending_subs:
                    if msg[M_CLIENTREF] in self.__pending_subs:
                        callback = self.__pending_subs.pop(msg[M_CLIENTREF])
                        if payload[P_POINT_TYPE] == R_FEED:
                            self.__callbacks[_CB_FEED][payload[P_POINT_ID]] = callback
                        else:
                            logger.warning('Subscription intended to feed is actually control: %s', payload[P_POINT_ID])

            elif payload[P_RESOURCE] == R_CONTROL:
                with self.__pending_controls:
                    if msg[M_CLIENTREF] in self.__pending_controls:
                        # callbacks by thing
                        entity_point_callbacks = self.__callbacks[_CB_CONTROL].setdefault(payload[P_ENTITY_LID], {})
                        # callback by thing and point
                        entity_point_callbacks[payload[P_LID]] = self.__pending_controls.pop(msg[M_CLIENTREF])

        elif msg[M_TYPE] == E_RECENTDATA:
            samples = []
            for sample in payload[P_SAMPLES]:
                data, mime, time = self.__decode_data_time(sample)
                samples.append({'data': data, 'mime': mime, 'time': time})
            self.__fire_callback(_CB_RECENT_DATA, {'c': msg[M_CLIENTREF],
                                                   'samples': samples})
240868
function pongTableUpdateData( divId, doFilter ) {
  log( "Pong-Table",  'update '+divId );
  var tblDef = poTbl[ divId ].pongTableDef;
  var paramsObj = null;
  if ( doFilter && tblDef.filter) {
    var fPar = {};
    for( var y = 0; y < tblDef.filter.dataReqParams.length; y++ ) {
      prop = tblDef.filter.dataReqParams[y];
      if ( prop.type != 'checkbox' ) {
        fPar[ prop.id] = encodeURI( $( '#'+divId+prop.id+'filter' ).val() );
      } else {
        fPar[ prop.id] = $( '#'+divId+prop.id+'filter' ).is(':checked');
      }
    } 
    paramsObj =  { dataFilter: fPar }
  }

  if ( poTbl[ divId ].resourceURL != '-' ) {
    
    var callParams = {} // merge paramsObj and GET-params:
    if ( paramsObj == null) {
      callParams = poTbl[ divId ].params.get;
    } else {
      callParams = JSON.parse( JSON.stringify ( poTbl[ divId ].params.get ) );
      for ( var attr in paramsObj ) { 
        callParams[ attr ] = paramsObj[ attr ]; 
      }		
    }
    log( "Pong-Table",  'update parma= '+JSON.stringify( callParams ) );			

    $.getJSON( tblDef.dataUrlFull, paramsObj ,
      function( data ) { 	
        log( "Pong-Table",  JSON.stringify( data ) );
        var subdata = getSubData( data, tblDef.dataDocSubPath );
        pongTableSetData( divId, subdata ); 
        publishEvent( 'feedback', {'text':'Table data loaded sucessfully'} )
      } 
    ).fail( 
        function() { publishEvent( 'feedback', {'text':'Table service offline? Config OK?'} ) } 
    );
    
  }
}
599907
def perform_update(self, data, instance):
        

        for key, val in data.items():
            setattr(instance, key, val)
547429
async def update(self, **kwargs):
        '''
        
        '''
        try:
            self.data[self.pk] = self.pk_type(kwargs['pk'])
            updated_obj = await self._meta.object_class().update(self.db, data=self.data)
            if updated_obj is None:
                raise NotFound('Object matching the given {} was not found'.format(self.pk))
            return await updated_obj.serialize()
        except Exception as ex:
            logger.exception(ex)
            raise BadRequest(ex)
1004536
function update(instance, array, tx, callback) {
    var
        model = instance.__model,
        beforeUpdate = model.__beforeUpdate,
        updates,
        params,
        sql;
    if (beforeUpdate) {
        beforeUpdate(instance);
    }
    if (!array) {
        array = model.__updateAttributesArray;
    }
    updates = _.map(array, function (attr) {
        return '`' + attr + '`=?';
    });
    params = _.map(array, function (attr) {
        return instance[attr];
    });
    params.push(instance[model.__primaryKey]);
    sql = utils.format('update `%s` set %s where `%s`=?', model.__table, updates.join(', '), model.__primaryKey);
    smartRunSQL(model.__pool, sql, params, tx, function (err, result) {
        if (err) {
            return callback(err);
        }
        callback(null, instance);
    });
}
290012
function (request, xhr, callback) {

            var model = request.model;

            if (this._parsePayloadOnUpdate(request, xhr)) {
                this._parseModelPayload(xhr, model, request.options);
            }

            if (callback) {
                callback(null, model, request.options);
            }
        }
189843
private function insertData($callback = null): void
    {
        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['pre_actions']
        );

        for ($rowNum = 1; $rowNum <= $this->limit; $rowNum++) {
            // Call the right method according to the mode
            $this->{$this->insertMode[$this->mode]}($rowNum);

            if (!is_null($callback)) {
                $callback($rowNum);
            }
        }

        // Run a final method if defined
        if ($this->mode === 'batch') {
            $this->loadDataInBatch('insert');
        }

        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['post_actions']
        );
    }
877661
def __add_callback(self, type_, func, serialised_if_crud=True):
        """"""
        Validation.callable_check(func)
        with self.__callbacks:
            self.__callbacks[type_].append((func, serialised_if_crud))
1106122
function update (req, res, next) {
    for (var key in req.body) {
      req.body[key] = utils.toNative(req.body[key])
    }

    var id = utils.toNative(req.params.id)
    var chain = db.get(name)

    chain = req.method === 'PATCH'
      ? chain.updateById(id, req.body)
      : chain.replaceById(id, req.body)

    var resource = chain.value()

    if (resource) {
      res.locals.data = resource
    }

    next()
  }
375466
def _after_handler(self, iid, callback, args):
        """"""
        self._after_id = None
        self.update_state(iid, "normal")
        self.call_callbacks(iid, callback, args)
334622
def handle_data(self, context, data, dt):
        
        if self.rule.should_trigger(dt):
            self.callback(context, data)
724939
def call(self, callname, data=None, **args):
        
        url = f"{self.url_base}/{callname}"
        payload = self.payload.copy()
        payload.update(**args)

        if data is not None:
            payload.update(data)

        res = self.session.post(url, data=payload)

        if res.status_code > 299:
            self.log.error(f"URL: {url}")
            self.log.error(f"Payload: {payload}")
            self.log.error(f"STATUS: {res.status_code}")
            self.log.error(f"RESPONSE: {res.text}")
            return
        elif 'error' in res.json():
            self.log.error(res.json()['error'])
            return

        return res.json()
661068
function updates (qs0, callback0) {
    const { opts, callback } = getCallback(qs0, callback0)
    return relax({
      db: '_db_updates',
      qs: opts
    }, callback)
  }
296583
function updateUserDataField(userId, data, overwrite, callback) {
        return _updateUserObjectField(userId, ['data'], data, overwrite)
            .then(function (userData) {
                return userData.data;
            })
            .nodeify(callback);
    }
1277887
def add_update_callback(self, callback, device):
        """"""
        self._update_callbacks.append([callback, device])
        _LOGGER.debug('Added update callback to %s on %s', callback, device)