language-extensions/R/src/RExtension.cpp
//--------------------------------------------------------------------------------------------------
// Name: InitColumn
//
// Description:
//  Initializes column-specific data. We store the name and the data type of the column here.
//
// Returns:
//  SQL_SUCCESS on success, else SQL_ERROR
//
InitColumn
Description:
Initializes column-specific data. We store the name and the data type of the column here.


InitColumn Description : Initializes column - specific data . We store the name and the data type of the column here .
SQLRETURN InitColumn(
	SQLGUID      sessionId,
	SQLUSMALLINT taskId,
	SQLUSMALLINT columnNumber,
	SQLCHAR      *columnName,
	SQLSMALLINT  columnNameLength,
	SQLSMALLINT  dataType,
	SQLULEN      columnSize,
	SQLSMALLINT  decimalDigits,
	SQLSMALLINT  nullable,
	SQLSMALLINT  partitionByNumber,
	SQLSMALLINT  orderByNumber
)
{
	LOG("RExtension::InitColumn");
	SQLRETURN result = SQL_ERROR;
	try
	{
		RSession* session = CheckAndGetSession("InitColumn", sessionId, taskId);
		session->InitColumn(
			columnNumber,
			columnName,
			columnNameLength,
			dataType,
			columnSize,
			decimalDigits,
			nullable,
			partitionByNumber,
			orderByNumber);
		result = SQL_SUCCESS;
	}
	catch (exception &ex)
	{
		LOG_EXCEPTION(ex);
	}
	catch (...)
	{
		LOG_ERROR("Unexpected exception occurred in function InitColumn().");
	}
	return result;
}
SQLRETURN InitColumn ( SQLGUID sessionId , SQLUSMALLINT taskId , SQLUSMALLINT columnNumber , SQLCHAR * columnName , SQLSMALLINT columnNameLength , SQLSMALLINT dataType , SQLULEN columnSize , SQLSMALLINT decimalDigits , SQLSMALLINT nullable , SQLSMALLINT partitionByNumber , SQLSMALLINT orderByNumber ) { LOG ( " " ) ; SQLRETURN result = SQL_ERROR ; try { RSession * session = CheckAndGetSession ( " " , sessionId , taskId ) ; session -> InitColumn ( columnNumber , columnName , columnNameLength , dataType , columnSize , decimalDigits , nullable , partitionByNumber , orderByNumber ) ; result = SQL_SUCCESS ; } catch ( exception & ex ) { LOG_EXCEPTION ( ex ) ; } catch ( ... ) { LOG_ERROR ( " " ) ; } return result ; }
Name: InitColumn
Description:
Initializes column-specific data.
Name : InitColumn Description : Initializes column - specific data .