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)])
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) ])
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)])