dossier/store/store.py
def scan(self, *key_ranges):
        '''Retrieve feature collections in a range of ids.

        Returns a generator of content objects corresponding to the
        content identifier ranges given. `key_ranges` can be a possibly
        empty list of 2-tuples, where the first element of the tuple
        is the beginning of a range and the second element is the end
        of a range. To specify the beginning or end of the table, use
        an empty tuple `()`.

        If the list is empty, then this yields all content objects in
        the storage.

        :param key_ranges: as described in
                           :meth:`kvlayer._abstract_storage.AbstractStorage`
        :rtype: generator of
                (``content_id``, :class:`dossier.fc.FeatureCollection`).
        '''
        # (id, id) -> ((id,), (id,))
        key_ranges = [(tuplify(s), tuplify(e)) for s, e in key_ranges]
        return imap(lambda (cid, fc): (cid[0], fc_loads(fc)),
                    self.kvl.scan(self.TABLE, *key_ranges))
def scan(self, *key_ranges):
        '''Retrieve feature collections in a range of ids.

        Returns a generator of content objects corresponding to the
        content identifier ranges given. `key_ranges` can be a possibly
        empty list of 2-tuples, where the first element of the tuple
        is the beginning of a range and the second element is the end
        of a range. To specify the beginning or end of the table, use
        an empty tuple `()`.

        If the list is empty, then this yields all content objects in
        the storage.

        :param key_ranges: as described in
                           :meth:`kvlayer._abstract_storage.AbstractStorage`
        :rtype: generator of
                (``content_id``, :class:`dossier.fc.FeatureCollection`).
        '''
        # (id, id) -> ((id,), (id,))
        key_ranges = [(tuplify(s), tuplify(e)) for s, e in key_ranges]
        return imap(lambda (cid, fc): (cid[0], fc_loads(fc)),
                    self.kvl.scan(self.TABLE, *key_ranges))
def scan ( self , * key_ranges ) : # (id, id) -> ((id,), (id,)) key_ranges = [ ( tuplify ( s ) , tuplify ( e ) ) for s , e in key_ranges ] return imap ( lambda ( cid , fc ) : ( cid [ 0 ] , fc_loads ( fc ) ) , self . kvl . scan ( self . TABLE , * key_ranges ) )
Retrieve feature collections in a range of ids.

        Returns a generator of content objects corresponding to the
        content identifier ranges given. `key_ranges` can be a possibly
        empty list of 2-tuples, where the first element of the tuple
        is the beginning of a range and the second element is the end
        of a range. To specify the beginning or end of the table, use
        an empty tuple `()`.

        If the list is empty, then this yields all content objects in
        the storage.

        :param key_ranges: as described in
                           :meth:`kvlayer._abstract_storage.AbstractStorage`
        :rtype: generator of
                (``content_id``, :class:`dossier.fc.FeatureCollection`).
Retrieve feature collections in a range of ids .