:type item: moto.dynamodb2.models.Item
480272
def _lhs(self, item):
        
        lhs = self.lhs
        if isinstance(self.lhs, (Op, Func)):
            lhs = self.lhs.expr(item)
        elif isinstance(self.lhs, six.string_types):
            try:
                lhs = item.attrs[self.lhs].cast_value
            except Exception:
                pass

        return lhs
1177536
function ForItemData(forElement, item, index) {
    this.parent = forElement.scope;
    this.raw = {};
    this.listeners = [];

    this.directive = forElement.aNode.directives['for']; // eslint-disable-line dot-notation
    this.indexName = this.directive.index || '$index';

    this.raw[this.directive.item] = item;
    this.raw[this.indexName] = index;
}
562781
def _set_item_querytime(self, item, type_check=True):
        
        if isinstance(item, Versionable):
            item._querytime = self.querytime
        elif isinstance(item, VersionedQuerySet):
            item.querytime = self.querytime
        else:
            if type_check:
                raise TypeError(
                    "This item is not a Versionable, it's a " + str(
                        type(item)))
        return item
296725
function processItemtype(item, processedItems) {
  processedItems.push({
    'id':         md5($(item).html()),
    'name':       $(item).attr('itemtype'),
    'properties': {}
  });

}
1248583
def store_item(self, item):
        '''  '''
        assert not isinstance(item, RamGraphDBNode)
        item_hash = graph_hash(item)
        if item_hash not in self.nodes:
            self.nodes[item_hash] = RamGraphDBNode(item)
        return self.nodes[item_hash]
1261466
def unpack_from_dynamodb(*, attrs, expected, model=None, obj=None, engine=None, context=None, **kwargs):
    """"""
    context = context or {"engine": engine}
    engine = engine or context.get("engine", None)
    if not engine:
        raise ValueError("You must provide engine or a context with an engine.")
    if model is None and obj is None:
        raise ValueError("You must provide a model or obj to unpack.")
    if model is not None and obj is not None:
        raise ValueError("Only specify model or obj.")
    if model:
        obj = model.Meta.init()

    for column in expected:
        value = attrs.get(column.dynamo_name, None)
        value = engine._load(column.typedef, value, context=context, **kwargs)
        setattr(obj, column.name, value)
    return obj
455276
public function put(Item $item, Context\Put $context = null)
    {
        $table = $item->getTable();

        if (null !== $this->logger) {
            $this->log('Put on table '.$table);
        }

        if (empty($table)) {
            throw new \Riverline\DynamoDB\Exception\AttributesException('Item do not have table defined');
        }

        $attributes = array();
        foreach ($item as $name => $attribute) {
            /** @var $attribute \Riverline\DynamoDB\Attribute */
            if ("" !== $attribute->getValue()) {
                // Only not empty string
                $attributes[$name] = $attribute->getForDynamoDB();
            }
        }
        $parameters = array(
            'TableName' => $table,
            'Item'      => $attributes,
        );

        if (null !== $context) {
            $parameters += $context->getForDynamoDB();
        }

        if (null !== $this->logger) {
            $this->log('Put request paramaters : '.print_r($parameters, true), Logger::DEBUG);
        }

        $response = $this->connector->putItem($parameters);

        if (null !== $this->logger) {
            $this->log('Put request response : '.print_r($response, true), Logger::DEBUG);
        }

        // Update write counter
        $this->addConsumedWriteUnits($table, floatval($response['ConsumedCapacityUnits']));

        return $this->populateAttributes($response);
    }
463821
function ItemsItem() {
    /**
     * The id value
     * @member
     */
    this.id = null;
    /**
     * The sku value
     * @member
     */
    this.sku = null;
    /**
     * The title value
     * @member
     */
    this.title = null;
    /**
     * The quantity value
     * @member
     */
    this.quantity = null;
    /**
     * The price value
     * @member
     */
    this.price = null;
    /**
     * The formattedPrice value
     * @member
     */
    this.formattedPrice = null;
    /**
     * The currency value
     * @member
     */
    this.currency = null;
    /**
     * The productLink value
     * @member
     */
    this.productLink = null;
    /**
     * The weight value
     * @member
     */
    this.weight = null;
    /**
     * The formattedWeight value
     * @member
     */
    this.formattedWeight = null;
    /**
     * The media of value
     * @member
     * @type { Media }
     */
    this.media = Object.create(Media.prototype);

}
184853
function(item) {
        if (item && Selectivity.isValidId(item.id) && isString(item.text)) {
            return item;
        } else {
            throw new Error('Item should have id (number or string) and text (string) properties');
        }
    }
842655
def primary_key_tuple(self, item):
        
        if self.range_key is None:
            return (item[self.hash_key.name],)
        else:
            return (item[self.hash_key.name], item[self.range_key.name])
1162630
def format_item(self, item):
        
        # http://jsonapi.org/format/#document-top-level
        # Primary data MUST be either... a single resource object, a single resource
        # identifier object, or null, for requests that target single resources
        if not item:
            return None

        ret = self.dict_class()
        ret[TYPE] = self.opts.type_

        # Get the schema attributes so we can confirm `dump-to` values exist
        attributes = {
            (get_dump_key(self.fields[field]) or field): field
            for field in self.fields
        }

        for field_name, value in iteritems(item):
            attribute = attributes[field_name]
            if attribute == ID:
                ret[ID] = value
            elif isinstance(self.fields[attribute], DocumentMeta):
                if not self.document_meta:
                    self.document_meta = self.dict_class()
                self.document_meta.update(value)
            elif isinstance(self.fields[attribute], ResourceMeta):
                if 'meta' not in ret:
                    ret['meta'] = self.dict_class()
                ret['meta'].update(value)
            elif isinstance(self.fields[attribute], BaseRelationship):
                if value:
                    if 'relationships' not in ret:
                        ret['relationships'] = self.dict_class()
                    ret['relationships'][self.inflect(field_name)] = value
            else:
                if 'attributes' not in ret:
                    ret['attributes'] = self.dict_class()
                ret['attributes'][self.inflect(field_name)] = value

        links = self.get_resource_links(item)
        if links:
            ret['links'] = links
        return ret
300833
def setNamedItem(self, item: Attr) -> None:
        """"""
        from wdom.web_node import WdomElement
        if not isinstance(item, Attr):
            raise TypeError('item must be an instance of Attr')
        if isinstance(self._owner, WdomElement):
            self._owner.js_exec('setAttribute', item.name,  # type: ignore
                                item.value)
        self._dict[item.name] = item
        item._owner = self._owner
954765
def put(self, item):
        
        uid = str(uuid.uuid4())

        if self.serializer is not None:
            item = self.serializer.dumps(item)

        self._redis.pipeline()\
                .hset(self.ITEMS_KEY, uid, item)\
                .lpush(self.QUEUE_KEY, uid)\
                .execute()
        return uid
613120
def deserialize_current_record_to_durable_model(record, current_model, durable_model):
    
    # Was the item in question too big for SNS? If so, then we need to fetch the item from the current Dynamo table:
    if record.get(EVENT_TOO_BIG_FLAG):
        record = get_full_current_object(record['dynamodb']['Keys']['arn']['S'], current_model)

        if not record:
            return None

        serialized = record._serialize()  # pylint: disable=W0212

        record = {
            'dynamodb': {
                'NewImage': serialized['attributes']
            }
        }

        # The ARN isn't added because it's in the HASH key section:
        record['dynamodb']['NewImage']['arn'] = {'S': serialized['HASH']}

    new_image = remove_current_specific_fields(record['dynamodb']['NewImage'])
    data = {}

    for item, value in new_image.items():
        # This could end up as loss of precision
        data[item] = DESER.deserialize(value)

    return durable_model(**data)
670973
def do_rmall(self, line):
        ""
        args = self.getargs(line)
        if args and args[-1] == "yes":
            args.pop()

            if not args:
                args = [self.table.table_name]

            while args:
                table = boto.dynamodb2.table.Table(args.pop(0), connection=self.conn)
                print "from table " + table.table_name

                for item in table.scan(attributes_to_get=[], request_limit=10):
                    print "  removing %s" % item
                    item.delete()
        else:
            print "ok, never mind..."
585788
def currentItem( self ):
        
        model = self.navigationModel()
        if ( not model ):
            return None
        
        return model.itemByPath(self.text())
716703
private static List<UberData> doExtractLinksAndContent(Object item) {

		if (item instanceof EntityModel) {
			return extractLinksAndContent((EntityModel<?>) item);
		}

		if (item instanceof RepresentationModel) {
			return extractLinksAndContent((RepresentationModel<?>) item);
		}

		return extractLinksAndContent(new EntityModel<>(item));
	}