def _open(self, db, writeAccess=False):
        """
        Handles simple, SQL specific connection creation.  This will not
        have to manage thread information as it is already managed within
        the main open method for the SQLBase class.
        
        :param      db | <orb.Database>
        
        :return     <variant> | backend specific database connection
        """
        if not pg:
            raise orb.errors.BackendNotFound('psycopg2 is not installed.')

        if db.timeout():
            os.environ['PGOPTIONS'] = '-c statement_timeout={0}'.format(db.timeout())

        # create the python connection
        try:
            return pg.connect(database=db.name(),
                              user=db.username(),
                              password=db.password(),
                              host=db.writeHost() if writeAccess else db.host(),
                              port=db.port(),
                              connect_timeout=3)
        except pg.OperationalError as err:
            log.exception('Failed to connect to postgres')
            raise orb.errors.ConnectionFailed()
def _open ( self , db , writeAccess = False ) : if not pg : raise orb . errors . BackendNotFound ( 'psycopg2 is not installed.' ) if db . timeout ( ) : os . environ [ 'PGOPTIONS' ] = '-c statement_timeout={0}' . format ( db . timeout ( ) ) try : return pg . connect ( database = db . name ( ) , user = db . username ( ) , password = db . password ( ) , host = db . writeHost ( ) if writeAccess else db . host ( ) , port = db . port ( ) , connect_timeout = 3 ) except pg . OperationalError as err : log . exception ( 'Failed to connect to postgres' ) raise orb . errors . ConnectionFailed ( )
Handles simple, SQL specific connection creation.  This will not
        have to manage thread information as it is already managed within
        the main open method for the SQLBase class.
        
        :param      db | <orb.Database>
        
        :return     <variant> | backend specific database connection