def __init__(self, id=None): DB_CON.register([TopicDoc]) datastroe = DB_CON[DB_NAME] col_name = TopicDoc.__collection__ collection = datastroe[col_name] doc = collection.TopicDoc() API.__init__(self, id=id, col_name=col_name, collection=collection, doc=doc)
def __init__(self, app_id=None, need_owner=False, **config): self.app_id = app_id self.need_owner = need_owner DB_CON.register([ComponentDoc]) self.datastroe = DB_CON[DB_NAME] self.col_name = ComponentDoc.__collection__ self.col = self.datastroe[self.col_name] self._init_config(**config) self.initialize()
def __init__(self, uid, eid, stamp): self.uid = uid self.eid = eid self.stamp = stamp DB_CON.register([TimelineDoc]) self.datastroe = DB_CON[DB_NAME] col_name = stamp+'timeline' collection = self.datastroe[col_name] doc = collection.TimelineDoc() API.__init__(self, id=None, col_name=col_name, collection=collection, doc=doc)
def __init__(self, app_id, uid, eid, stamp): self.app_id = app_id self.uid = uid self.eid = eid self.stamp = stamp DB_CON.register([TimelineDoc]) self.datastroe = DB_CON[DB_NAME] self.col_t_name = stamp+'timeline' self.col_t = self.datastroe[self.col_t_name] Component.__init__(self, app_id=app_id, need_owner=False, **self._CONFIGURE)
def init_col(self): DB_CON.register([StackerDoc]) self.datastroe = DB_CON[DB_NAME] self.col_name = StackerDoc.__collection__ self.col = self.datastroe[self.col_name]
def __init__(self, idx): self.idx = idx DB_CON.register([IdDoc]) self.datastroe = DB_CON[DB_NAME] self.collection = self.datastroe[IdDoc.__collection__]