예제 #1
0
파일: abstracts.py 프로젝트: codeix/pyaxl
 def _configure(self, configname):
     """ a part of init method. If no name is given it will
         take automatically the name of the class.
     """
     self.__client__ = AXLClient.get_client(configname)
     self.__config__ = pyaxl.configuration.registry.get(configname)
     self.__configname__ = configname
     if self.__name__ is '':
         self.__name__ = self.__class__.__name__
예제 #2
0
 def _configure(self, configname):
     """ a part of init method. If no name is given it will
         take automatically the name of the class.
     """
     self.__client__ = AXLClient.get_client(configname)
     self.__config__ = pyaxl.configuration.registry.get(configname)
     self.__configname__ = configname
     if self.__name__ is '':
         self.__name__ = self.__class__.__name__
예제 #3
0
파일: abstracts.py 프로젝트: codeix/pyaxl
 def list(cls, criteria, returns, skip=None, first=None, configname='default'):
     """ find all object with the given search criteria. It also
         required a list with return values. The return value is a
         generator and the next call will return a tuple with the returnsValues.
     """
     client = AXLClient.get_client(configname)
     method = cls._axl_method(PF_LIST, cls.__name__, client)
     tags = dict([(i, True) for i in returns])
     log.debug('fetch list of %ss, search criteria=%s' % (cls.__name__, str(criteria)))
     args = criteria, tags
     if skip is not None or first is not None:
         if skip is None:
             skip = 0
         if first is None:
             args = criteria, tags, skip
         else:
             args = criteria, tags, skip, first
     return cls._prepare_result(method(*args), returns)
예제 #4
0
 def list(cls,
          criteria,
          returns,
          skip=None,
          first=None,
          configname='default'):
     """ find all object with the given search criteria. It also
         required a list with return values. The return value is a
         generator and the next call will return a tuple with the returnsValues.
     """
     client = AXLClient.get_client(configname)
     method = cls._axl_method(PF_LIST, cls.__name__, client)
     tags = dict([(i, True) for i in returns])
     log.debug('fetch list of %ss, search criteria=%s' %
               (cls.__name__, str(criteria)))
     args = criteria, tags
     if skip is not None or first is not None:
         if skip is None:
             skip = 0
         if first is None:
             args = criteria, tags, skip
         else:
             args = criteria, tags, skip, first
     return cls._prepare_result(method(*args), returns)
예제 #5
0
파일: axlsql.py 프로젝트: codeix/pyaxl
 def __init__(self, configname):
     self.client = AXLClient.get_client(configname)
예제 #6
0
파일: axlsql.py 프로젝트: yvigara/pyaxl
 def __init__(self, configname):
     self.client = AXLClient.get_client(configname)