Update the state of the Table object based on the response
        data received from Amazon DynamoDB.
518835
def update_from_response(self, response):
        
        if 'Table' in response:
            self._dict.update(response['Table'])
        elif 'TableDescription' in response:
            self._dict.update(response['TableDescription'])
        if 'KeySchema' in self._dict:
            self._schema = Schema(self._dict['KeySchema'])
1258227
public void updateMetadata(String tableName, String metadata){
		try {
			updateStatement.setString(1, metadata);
			updateStatement.setLong(2, tableName.hashCode());
			updateStatement.executeUpdate();
		} catch (SQLException e) {
			throw new BackendException("Could not update metadata for table '" + tableName + "'", e);
		}
	}
78857
def update!(conditions = {})
      run_callbacks(:update) do
        options = range_key ? { range_key: Dumping.dump_field(read_attribute(range_key), self.class.attributes[range_key]) } : {}

        begin
          new_attrs = Dynamoid.adapter.update_item(self.class.table_name, hash_key, options.merge(conditions: conditions)) do |t|
            t.add(lock_version: 1) if self.class.attributes[:lock_version]

            if Dynamoid::Config.timestamps
              time_now = DateTime.now.in_time_zone(Time.zone)
              time_now_dumped = Dumping.dump_field(time_now, self.class.attributes[:updated_at])
              t.set(updated_at: time_now_dumped)
            end

            yield t
          end
          load(Undumping.undump_attributes(new_attrs, self.class.attributes))
        rescue Dynamoid::Errors::ConditionalCheckFailedException
          raise Dynamoid::Errors::StaleObjectError.new(self, 'update')
        end
      end
    end
1096420
def _update_state(self, operation_pb):
        
        if operation_pb.done:
            self._complete = True

        if operation_pb.HasField("metadata"):
            self.metadata = _from_any(operation_pb.metadata)

        result_type = operation_pb.WhichOneof("result")
        if result_type == "error":
            self.error = operation_pb.error
        elif result_type == "response":
            self.response = _from_any(operation_pb.response)
422254
def update(self):
        """"""
        response = requests.get(self.update_url, timeout=timeout)
        match = ip_pattern.search(response.content)

        # response must contain an ip address, or else we can't parse it
        if not match:
            raise ApiError("Couldn't parse the server's response",
                    response.content)

        self.ip = match.group(0)
842624
def update_state(self):
        
        response = self.api_interface.get_device_state(self, id_override=self.parent.object_id(),
                                                       type_override=self.parent.object_type())
        self._update_state_from_response(response)
1010320
def sync(obj, engine):
    """"""
    snapshot = Condition()
    # Only expect values (or lack of a value) for columns that have been explicitly set
    for column in sorted(_obj_tracking[obj]["marked"], key=lambda col: col.dynamo_name):
        value = getattr(obj, column.name, None)
        value = engine._dump(column.typedef, value)
        condition = column == value
        # The renderer shouldn't try to dump the value again.
        # We're dumping immediately in case the value is mutable,
        # such as a set or (many) custom data types.
        condition.dumped = True
        snapshot &= condition
    _obj_tracking[obj]["snapshot"] = snapshot
352591
def get_table_status(table_name):
    
    try:
        desc = DYNAMODB_CONNECTION.describe_table(table_name)
    except JSONResponseError:
        raise

    return desc[u'Table'][u'TableStatus']
881798
def update(database, table, key):
    """"""
    field = random.randrange(10)
    value = ''.join(random.choice(string.printable) for i in range(100))
    with database.batch() as batch:
        batch.update(table=table, columns=('id', 'field%d' % field),
                     values=[(key, value)])
312104
def _update(self, resource, update_dict=None, params=None, **kwargs):
        """"""
        url = self._client._build_url(resource, **kwargs)
        response = self._client._request('PUT', url, json=update_dict, params=params)

        if response.status_code != requests.codes.ok:  # pragma: no cover
            raise APIError("Could not update {} ({})".format(self.__class__.__name__, response.json().get('results')))
        else:
            self.refresh()
1086971
def update(self,table, sys_id, **kparams):
        
        result = self.table_api_put(table, sys_id, **kparams)
        return self.to_record(result, table)
437524
def update(instance, full_clean=True, post_save=False, **kwargs):
    ""

    # apply the updated args to the instance to mimic the change
    # note that these might slightly differ from the true database values
    # as the DB could have been updated by another thread. callers should
    # retrieve a new copy of the object if up-to-date values are required
    for k, v in kwargs.iteritems():
        if isinstance(v, ExpressionNode):
            v = resolve_expression_node(instance, v)
        setattr(instance, k, v)

    # clean instance before update
    if full_clean:
        instance.full_clean()

    # fields that use auto_now=True should be updated corrected, too!
    for field in instance._meta.fields:
        if hasattr(field, 'auto_now') and field.auto_now and field.name not in kwargs:
            kwargs[field.name] = field.pre_save(instance, False)

    rows_affected = instance.__class__._default_manager.filter(
        pk=instance.pk).update(**kwargs)

    if post_save:
        signals.post_save.send(sender=instance.__class__, instance=instance)

    return rows_affected
432930
def update_status(table_name="swdata", date_column="date"):
    
    status_text = 'Latest entry: {}'.format(
        _get_most_recent_record(table_name, date_column))
    L.info(status_text)

    scraperwiki.status('ok', status_text)
361771
def update(cls, spec, updates, upsert=False):
        '''
        
        '''
        if 'key' in spec:
            previous = cls.get(spec['key'])
        else:
            previous = None
        if previous:
            # Update existing data.
            current = cls(**previous.__dict__)
        elif upsert:
            # Create new data.
            current = cls(**spec)
        else:
            current = None
        # XXX Should there be any error thrown if this is a noop?
        if current:
            current.__dict__.update(updates)
            current.save()
        return current
607939
def update(self, **kwargs):
        
        if not self.object_id:
            return False

        url = self.build_url(
            self._endpoints.get('item').format(id=self.object_id))

        data = {self._cc(key): value for key, value in kwargs.items() if
                key in {'name',
                        'description'}}  # convert keys to protocol casing
        if not data:
            return False

        response = self.con.patch(url, data=data)
        if not response:
            return False

        new_data = response.json()

        for key in data:
            value = new_data.get(key, None)
            if value:
                setattr(self, self.protocol.to_api_case(key), value)

        return True
215181
def _set_table(self, data):
        
        self.set_state('table')
        self.current_table = HEPTable(index=len(self.tables) + 1)
        self.tables.append(self.current_table)
        self.data.append(self.current_table.metadata)
667324
def update(self):
        """"""

        from ambry.orm.exc import NotFoundError
        from requests.exceptions import ConnectionError, HTTPError
        from boto.exception import S3ResponseError

        d = {}

        try:
            for k, v in self.list(full=True):
                if not v:
                    continue

                d[v['vid']] = {
                    'vid': v['vid'],
                    'vname': v.get('vname'),
                    'id': v.get('id'),
                    'name': v.get('name')
                }

            self.data['list'] = d
        except (NotFoundError, ConnectionError, S3ResponseError, HTTPError) as e:
            raise RemoteAccessError("Failed to update {}: {}".format(self.short_name, e))