'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.
Even though the select request does not require a domain object,
a domain object must be passed into this method so the Item objects
returned can point to the appropriate domain.
:type domain_or_name: string or :class:`boto.sdb.domain.Domain` object
:param domain_or_name: Either the name of a domain or a Domain object
:type query: string
:param query: The SimpleDB query to be performed.
:type consistent_read: bool
:param consistent_read: When set to true, ensures that the most recent
data is returned.
:rtype: ResultSet
:return: An iterator containing the results.'

def select(self, domain_or_name, query='', next_token=None, consistent_read=False):

    (domain, domain_name) = self.get_domain_and_name(domain_or_name)
    params = {'SelectExpression': query}
    if consistent_read:
        params['ConsistentRead'] = 'true'
    if next_token:
        params['NextToken'] = next_token
    try:
        return self.get_list('Select', params, [('Item', self.item_cls)], parent=domain)
    except SDBResponseError as e:
        e.body = ('Query:    %s\n%s' % (query, e.body))
        raise e
