ó FRTc@s¢ddlmZddlmZddlmZddlmZddlm Z m Z ddl m Z m Z mZdefd„ƒYZd efd „ƒYZd S( iÿÿÿÿ(tLayer1(tTable(tSchema(tItem(t BatchListtBatchWriteList(tget_dynamodb_typet DynamizertLossyFloatDynamizertTableGeneratorcBseeZdZd„Zed„ƒZed„ƒZed„ƒZed„ƒZd„Z d„Z RS(s This is an object that wraps up the table_generator function. The only real reason to have this is that we want to be able to accumulate and return the ConsumedCapacityUnits element that is part of each response. :ivar last_evaluated_key: A sequence representing the key(s) of the item last evaluated, or None if no additional results are available. :ivar remaining: The remaining quantity of results requested. :ivar table: The table to which the call was made. cCsp||_||_|dkr$dn||_||_||_d|_d|_d|_d|_ d|_ dS(Niÿÿÿÿgi( ttabletcallabletNonet remainingt item_classtkwargst_consumed_unitstlast_evaluated_keyt_countt_scanned_countt _response(tselfR R R RR((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pyt__init__0s        cCs|j|jS(sí The total number of items retrieved thus far. This value changes with iteration and even when issuing a call with count=True, it is necessary to complete the iteration to assert an accurate count value. (tresponseR(R((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pytcount<scCs|j|jS(s‚ As above, but representing the total number of items scanned by DynamoDB, without regard to any filters. (RR(R((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pyt scanned_countFscCs|j|jS(sU Returns a float representing the ConsumedCapacityUnits accumulated. (RR(R((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pytconsumed_unitsOscCs |jdkr|jƒS|jS(sA The current response to the call from DynamoDB. N(RR t next_response(R((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pyRWscCsR|jjdƒ}|jdkrO|d ks<||jkrO|j|jd= first value, <= second value (2) :type attributes_to_get: list :param attributes_to_get: A list of attribute names. If supplied, only the specified attribute names will be returned. Otherwise, all attributes will be returned. :type request_limit: int :param request_limit: The maximum number of items to retrieve from Amazon DynamoDB on each request. You may want to set a specific request_limit based on the provisioned throughput of your table. The default behavior is to retrieve as many results as possible per request. :type max_results: int :param max_results: The maximum number of results that will be retrieved from Amazon DynamoDB in total. For example, if you only wanted to see the first 100 results from the query, regardless of how many were actually available, you could set max_results to 100 and the generator returned from the query method will only yeild 100 results max. :type count: bool :param count: If True, Amazon DynamoDB returns a total number of items for the Scan operation, even if the operation has no matching items for the assigned filter. If count is True, the actual items are not returned and the count is accessible as the ``count`` attribute of the returned object. :type exclusive_start_key: list or tuple :param exclusive_start_key: Primary key of the item from which to continue an earlier query. This would be provided as the LastEvaluatedKey in that query. :type item_class: Class :param item_class: Allows you to override the class used to generate the items. This should be a subclass of :class:`boto.dynamodb.item.Item` :rtype: :class:`boto.dynamodb.layer2.TableGenerator` R—RNRˆRRR!R…N( RcR_R RqRPR6R‡R R5tscan( RR RNRˆRœRR!RRR(R((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pyRŸÔsE   N(#R.R/R RRRRR@RIRJRMRPRWR&RcRdReRkRpRsRttlookupRwR}R~R„RSRR†R‹RŽRR’R–R›RŸ(((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pyR2sP         "         )  *] N(tboto.dynamodb.layer1Rtboto.dynamodb.tableRtboto.dynamodb.schemaRtboto.dynamodb.itemRtboto.dynamodb.batchRRtboto.dynamodb.typesRRRtobjectR R2(((sA/opt/freeware/lib/python2.7/site-packages/boto/dynamodb/layer2.pytso