

def query(self):
    name = self.body['TableName']
    hash_key = self.body['HashKeyValue']
    range_condition = self.body.get('RangeKeyCondition')
    if range_condition:
        range_comparison = range_condition['ComparisonOperator']
        range_values = range_condition['AttributeValueList']
    else:
        range_comparison = None
        range_values = []
    (items, last_page) = dynamodb_backend.query(items, hash_key, range_comparison, range_values)
    if (items is None):
        er = 'com.amazonaws.dynamodb.v20111205#ResourceNotFoundException'
        return self.error(er)
    result = {
        'Count': len(items),
        'Items': [item.attrs for item in items],
        'ConsumedCapacityUnits': 1,
    }
    return dynamo_json_dump(result)

dataset/ETHPy150Open spulec/moto/moto/dynamodb/responses.py DynamoHandler.query/VarMisuse@83/126 `name`->`items`