예제 #1
0
파일: document.py 프로젝트: f3at/feat
 def by_type(self, type_name):
     '''
     Return an iterator of doc_ids of the documents of the
     specified type.
     '''
     if IRestorator.providedBy(type_name):
         type_name = type_name.type_name
     return (x[1] for x in self._links if x[0] == type_name)
예제 #2
0
파일: migration.py 프로젝트: zaheerm/feat
 def migrate_type(self, type, callback=None):
     if IRestorator.providedBy(type):
         type = type.type_name
     self._handlers[type] = callback
예제 #3
0
파일: view.py 프로젝트: f3at/feat
 def keys(type_name):
     if IRestorator.providedBy(type_name):
         type_name = type_name.type_name
     if not isinstance(type_name, (str, unicode)):
         raise ValueError(type_name)
     return dict(startkey=(type_name,), endkey=(type_name, {}))