Example #1
0
 def _ids_by_timestamp(self, database):
     tag_as_list = force_tag_to_list(self.index)
     startkey = tag_as_list + [self.timestamp.isoformat()]
     endkey = tag_as_list + [{}]
     return set(
         [result['id'] for result in database.view(
                     "couchexport/schema_index",
                     reduce=False,
                     startkey=startkey,
                     endkey=endkey)])
Example #2
0
 def _ids_by_timestamp(self, database):
     tag_as_list = force_tag_to_list(self.index)
     startkey = tag_as_list + [self.timestamp.isoformat()]
     endkey = tag_as_list + [{}]
     return set([
         result['id']
         for result in database.view("couchexport/schema_index",
                                     reduce=False,
                                     startkey=startkey,
                                     endkey=endkey)
     ])
Example #3
0
 def get_new_ids(self, database=None):
     database = database or self.get_db()
     assert self.timestamp, 'exports without timestamps are no longer supported.'
     tag_as_list = force_tag_to_list(self.index)
     startkey = tag_as_list + [self.timestamp.isoformat()]
     endkey = tag_as_list + [{}]
     return set(
         [result['id'] for result in database.view(
                     "couchexport/schema_index",
                     reduce=False,
                     startkey=startkey,
                     endkey=endkey)])
Example #4
0
 def get_new_ids(self, database=None):
     database = database or self.get_db()
     assert self.timestamp, 'exports without timestamps are no longer supported.'
     tag_as_list = force_tag_to_list(self.index)
     startkey = tag_as_list + [self.timestamp.isoformat()]
     endkey = tag_as_list + [{}]
     return set(
         [result['id'] for result in database.view(
                     "couchexport/schema_index",
                     reduce=False,
                     startkey=startkey,
                     endkey=endkey)])