def query_fetch_one ( self , query , values ) : self . cursor . execute ( query , values ) retval = self . cursor . fetchone ( ) self . __close_db ( ) return retval
iserie python how to get the cursor return value
Executes a db query gets the first value and closes the connection .
def query_fetch_one(self, query, values):
        """
        Executes a db query, gets the first value, and closes the connection.
        """
        self.cursor.execute(query, values)
        retval = self.cursor.fetchone()
        self.__close_db()
        return retval