language-extensions/python/src/PythonExtension.cpp
//-------------------------------------------------------------------------------------------------
// Name: GetResultColumn
//
// Description:
//  Returns information about the output column
//
// Returns:
//  SQL_SUCCESS on success, else SQL_ERROR
//

GetResultColumn
Description:
Returns information about the output column


GetResultColumn Description : Returns information about the output column
SQLRETURN GetResultColumn(
	SQLGUID      sessionId,
	SQLUSMALLINT taskId,
	SQLUSMALLINT columnNumber,
	SQLSMALLINT  *dataType,
	SQLULEN      *columnSize,
	SQLSMALLINT  *decimalDigits,
	SQLSMALLINT  *nullable
)
{
	LOG("GetResultColumn");
	SQLRETURN result = SQL_SUCCESS;
	string session = PythonExtensionUtils::ConvertGuidToString(&sessionId);
	try
	{
		g_pySessionMap[session]->GetResultColumn(
			columnNumber,
			dataType,
			columnSize,
			decimalDigits,
			nullable);
	}
	catch (const exception &ex)
	{
		result = SQL_ERROR;
		LOG_ERROR(ex.what());
	}
	catch (const bp::error_already_set&)
	{
		result = SQL_ERROR;
		LOG_ERROR("Python error: " + PythonExtensionUtils::ParsePythonException());
	}
	catch (...)
	{
		result = SQL_ERROR;
		LOG_ERROR("Unexpected exception occurred in function Execute()");
	}
	return result;
}
SQLRETURN GetResultColumn ( SQLGUID sessionId , SQLUSMALLINT taskId , SQLUSMALLINT columnNumber , SQLSMALLINT * dataType , SQLULEN * columnSize , SQLSMALLINT * decimalDigits , SQLSMALLINT * nullable ) { LOG ( " " ) ; SQLRETURN result = SQL_SUCCESS ; string session = PythonExtensionUtils :: ConvertGuidToString ( & sessionId ) ; try { g_pySessionMap [ session ] -> GetResultColumn ( columnNumber , dataType , columnSize , decimalDigits , nullable ) ; } catch ( const exception & ex ) { result = SQL_ERROR ; LOG_ERROR ( ex . what ( ) ) ; } catch ( const bp :: error_already_set & ) { result = SQL_ERROR ; LOG_ERROR ( " " + PythonExtensionUtils :: ParsePythonException ( ) ) ; } catch ( ... ) { result = SQL_ERROR ; LOG_ERROR ( " " ) ; } return result ; }
Name: GetResultColumn
Description:
Returns information about the output column
Name : GetResultColumn Description : Returns information about the output column