Example #1
0
 def __init__(self):
     DB_CON.register([UserDoc])
     datastore = DB_CON[DB_NAME]
     col_name = UserDoc.__collection__
     collection = datastore[col_name]
     doc = collection.UserDoc()
     API.__init__(self, col_name=col_name, collection=collection, doc=doc)
Example #2
0
 def __init__(self, db_name=DB_NAME):
     DB_CON.register([EventDoc])
     datastore = DB_CON[db_name]
     col_name = EventDoc.__collection__
     collection = datastore[col_name]
     doc = collection.EventDoc()
     API.__init__(self, db_name=db_name, col_name=col_name, collection=collection, doc=doc)
Example #3
0
 def __init__(self, idx):
     self.idx = idx
     DB_CON.register([IdDoc])
     self.datastroe = DB_CON[DB_NAME]
     self.collection = self.datastroe[IdDoc.__collection__]
Example #4
0
 def __init__(self):
     DB_CON.register([MappingDoc])
     self.datastore = DB_CON[DB_NAME]
     self.collection = self.datastore[MappingDoc.__collection__]
     self.doc = self.collection.MappingDoc()