def getCursor(self):
     try:
         #Conexion a postgre
         default        = DefaultConnection()
         self.conexion  = default.postgre_connect()
         cursor         = self.conexion.cursor(cursor_factory=psycopg2.extras.DictCursor)
         return cursor
     except Exception as e:
         logging.debug('Error obteniendo el cursor facade valoracion')
         raise Exception('Error no controlado: {}'.format(e.args[0]))			
     finally:            
         pass
Exemple #2
0
 def getCursor(self):
     try:
         #Conexion a postgre
         default = DefaultConnection()
         self.conexion = default.postgre_connect()
         cursor = self.conexion.cursor(
             cursor_factory=psycopg2.extras.DictCursor)
         return cursor
     except:
         print('Error obteniendo el cursor de dummy')
         raise Exception('Error no controlado: {}'.format(
             sys.exc_info()[0]))
     finally:
         pass
Exemple #3
0
 def __init__(self):
     """
     Cursor class
     """
     self.proxy = ProxyConfiguration()
     self.default_connection = DefaultConnection(self.proxy.engine)
 def __init__(self, engine):
     """
     Constructor
     """
     self.default_connection = DefaultConnection(engine)