Esempio n. 1
0
File: field.py Progetto: Tukki/xweb
 def one(self):
     from xweb.orm.unitofwork import UnitOfWork
     result = UnitOfWork.inst().fetchRowByCond(self)
     if result:
         return result[0]
     
     return None
Esempio n. 2
0
    def one(self):
        from xweb.orm.unitofwork import UnitOfWork
        result = UnitOfWork.inst().fetchRowByCond(self)
        if result:
            return result[0]

        return None
Esempio n. 3
0
File: field.py Progetto: Tukki/xweb
 def first(self):
     from xweb.orm.unitofwork import UnitOfWork
     self.limit(1)
     result = UnitOfWork.inst().getListByCond(self)
     if result:
         return result[0]
     
     return None
Esempio n. 4
0
    def first(self):
        from xweb.orm.unitofwork import UnitOfWork
        self.limit(1)
        result = UnitOfWork.inst().getListByCond(self)
        if result:
            return result[0]

        return None
Esempio n. 5
0
 def canUseCache(cls, use_cache):
     return UnitOfWork.inst().use_cache and use_cache
Esempio n. 6
0
 def getClient(cls, **kwargs):
     cache_name = cls.cacheName(**kwargs)
     return UnitOfWork.inst().cache_manager.get(cache_name)
Esempio n. 7
0
File: field.py Progetto: Tukki/xweb
 def all(self):
     from xweb.orm.unitofwork import UnitOfWork
     return UnitOfWork.inst().getListByCond(self)
Esempio n. 8
0
File: field.py Progetto: Tukki/xweb
 def row(self):
     from xweb.orm.unitofwork import UnitOfWork
     return UnitOfWork.inst().fetchRowByCond(self)
Esempio n. 9
0
 def canUseCache(cls, use_cache):
     return UnitOfWork.inst().use_cache and use_cache
Esempio n. 10
0
 def getClient(cls, **kwargs):
     cache_name = cls.cacheName(**kwargs)
     return UnitOfWork.inst().cache_manager.get(cache_name)
Esempio n. 11
0
 def all(self):
     from xweb.orm.unitofwork import UnitOfWork
     return UnitOfWork.inst().getListByCond(self)
Esempio n. 12
0
 def row(self):
     from xweb.orm.unitofwork import UnitOfWork
     return UnitOfWork.inst().fetchRowByCond(self)