Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
sdb
/
File Content:
domain.pyc
� �Wc @ s� d d l m Z d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ d d l Z d d l m Z d e f d � � YZ d d l m Z d e f d � � YZ d S( i����( t print_function( t SelectResultSet( t sixt Domainc B s� e Z d d d � Z d � Z d � Z d � Z d � Z d � Z e d d � Z e d � Z d e d d � Z d d d � Z d � Z d d e d d � Z e d � Z d � Z d � Z d d � Z d � Z d � Z RS( c C s | | _ | | _ d | _ d S( N( t connectiont namet Nonet _metadata( t selfR R ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt __init__ s c C s d | j S( Ns Domain:%s( R ( R ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt __repr__% s c C s t | j d | j � � S( Ns SELECT * FROM `%s`( t itert selectR ( R ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt __iter__( s c C s d S( N( R ( R R t attrsR ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt startElement+ s c C s, | d k r | | _ n t | | | � d S( Nt DomainName( R t setattr( R R t valueR ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt endElement. s c C s( | j s! | j j | � | _ n | j S( N( R R t domain_metadata( R ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyt get_metadata4 s c C s | j j | | | | | � S( s� Store attributes for a given item. :type item_name: string :param item_name: The name of the item whose attributes are being stored. :type attribute_names: dict or dict-like object :param attribute_names: The name/value pairs to store as attributes :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful ( R t put_attributes( R t item_namet attributest replacet expected_value( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyR 9 s $c C s | j j | | | � S( s� Store attributes for multiple items. :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are themselves dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful ( R t batch_put_attributes( R t itemsR ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyR ` s c C s | j j | | | | | � S( sU Retrieve attributes for a given item. :type item_name: string :param item_name: The name of the item whose attributes are being retrieved. :type attribute_names: string or list of strings :param attribute_names: An attribute name or list of attribute names. This parameter is optional. If not supplied, all attributes will be retrieved for the item. :rtype: :class:`boto.sdb.item.Item` :return: An Item mapping type containing the requested attribute name/values ( R t get_attributes( R R t attribute_namet consistent_readt item( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyR u s c C s | j j | | | | � S( s� Delete attributes from a given item. :type item_name: string :param item_name: The name of the item whose attributes are being deleted. :type attributes: dict, list or :class:`boto.sdb.item.Item` :param attributes: Either a list containing attribute names which will cause all values associated with that attribute name to be deleted or a dict or Item containing the attribute names and keys and list of values to delete as the value. If no value is supplied, all attribute name/values for the item will be deleted. :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :rtype: bool :return: True if successful ( R t delete_attributes( R R R t expected_values( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyR! � s #c C s | j j | | � S( s� Delete multiple items in this domain. :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are either: * dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. The attribute name/value pairs will only be deleted if they match the name/value pairs passed in. * None which means that all attributes associated with the item should be deleted. :rtype: bool :return: True if successful ( R t batch_delete_attributes( R R ( ( s3 /usr/lib/python2.7/site-packages/boto/sdb/domain.pyR# � s t c C s t | | d | d | d | �S( s Returns a set of Attributes for item names within domain_name that match the query. The query must be expressed in using the SELECT style syntax rather than the original SimpleDB query language. :type query: string :param query: The SimpleDB query to be performed. :rtype: iter :return: An iterator containing the results. This is actually a generator function that will iterate across all search results, not just the first page. t max_itemst next_tokenR ( R ( R t queryR&