language-extensions/R/src/RParam.cpp
//--------------------------------------------------------------------------------------------------
// Name: RNumericParam::SetRcppVector
//
// Description:
//  Sets the RcppVector for RNumericParam with the given paramValue.
//  This is a wrapper to CreateNumericVector with rowsNumber = 1.
//  For null parameters, a size one vector with member value = NA is created.
//
:SetRcppVector
Description:
Sets the RcppVector for RNumericParam with the given paramValue.
This is a wrapper to CreateNumericVector with rowsNumber = 1.
For null parameters, a size one vector with member value = NA is created.
: SetRcppVector Description : Sets the RcppVector for RNumericParam with the given paramValue . This is a wrapper to CreateNumericVector with rowsNumber = 1 . For null parameters a size one vector with member value = NA is created .
void RNumericParam::SetRcppVector(SQLPOINTER paramValue)
{
	LOG("RNumericParam::SetRcppVector");
	SQLINTEGER strLenOrInd = StrLenOrInd();
	if (strLenOrInd == SQL_NULL_DATA)
	{
		SQLINTEGER strLen_or_IndArray[1] = { SQL_NULL_DATA };
		m_RcppVector = RTypeUtils::CreateNumericVector(
			1, 
			paramValue,
			strLen_or_IndArray,
			m_decimalDigits,
			SQL_NULLABLE);
	}
	else
	{
		SQLINTEGER strLen_or_IndArray[1] = { strLenOrInd };
		m_RcppVector = RTypeUtils::CreateNumericVector(
			1,        
			paramValue,
			strLen_or_IndArray,
			m_decimalDigits,
			SQL_NO_NULLS);
	}
}
void RNumericParam :: SetRcppVector ( SQLPOINTER paramValue ) { LOG ( " " ) ; SQLINTEGER strLenOrInd = StrLenOrInd ( ) ; if ( strLenOrInd == SQL_NULL_DATA ) { SQLINTEGER strLen_or_IndArray [ 1 ] = { SQL_NULL_DATA } ; m_RcppVector = RTypeUtils :: CreateNumericVector ( 1 , paramValue , strLen_or_IndArray , m_decimalDigits , SQL_NULLABLE ) ; } else { SQLINTEGER strLen_or_IndArray [ 1 ] = { strLenOrInd } ; m_RcppVector = RTypeUtils :: CreateNumericVector ( 1 , paramValue , strLen_or_IndArray , m_decimalDigits , SQL_NO_NULLS ) ; } }
Name: RNumericParam::SetRcppVector
Description:
Sets the RcppVector for RNumericParam with the given paramValue.
Name : RNumericParam :: SetRcppVector Description : Sets the RcppVector for RNumericParam with the given paramValue .
// rowsNumber // rowsNumber