language-extensions/R/src/RParam.cpp
//--------------------------------------------------------------------------------------------------
// Name: RNumericParam::RetrieveValueAndStrLenInd
//
// Description:
//  Retrieves data from m_RcppVector, fills it in m_value and sets m_strLenOrInd accordingly.
//
:RetrieveValueAndStrLenInd
Description:
Retrieves data from m_RcppVector, fills it in m_value and sets m_strLenOrInd accordingly.
: RetrieveValueAndStrLenInd Description : Retrieves data from m_RcppVector fills it in m_value and sets m_strLenOrInd accordingly .
void RNumericParam::RetrieveValueAndStrLenInd()
{
	LOG("RNumericParam::RetrieveValueAndStrLenInd");
	Rcpp::Environment globalEnv = Rcpp::Environment::global_env();
	if (globalEnv.exists(m_name.c_str()))
	{
		Logger::LogRVariable(m_name);
		RInside* embeddedREnvPtr = REnvironment::EmbeddedREnvironment();
		m_RcppVector = (*embeddedREnvPtr)[m_name.c_str()];
		if (m_RcppVector.size() == 0)
		{
			m_strLenOrInd = SQL_NULL_DATA;
		}
		else
		{
			SQLSMALLINT nullable = SQL_NO_NULLS;
			RTypeUtils::FillDataFromNumericVector(
				1, 
				m_RcppVector,
				&m_value,
				&m_strLenOrInd,
				nullable,
				m_decimalDigits,
				m_precision);
		}
	}
	else
	{
		m_strLenOrInd = SQL_NULL_DATA;
	}
}
void RNumericParam :: RetrieveValueAndStrLenInd ( ) { LOG ( " " ) ; Rcpp :: Environment globalEnv = Rcpp :: Environment :: global_env ( ) ; if ( globalEnv . exists ( m_name . c_str ( ) ) ) { Logger :: LogRVariable ( m_name ) ; RInside * embeddedREnvPtr = REnvironment :: EmbeddedREnvironment ( ) ; m_RcppVector = ( * embeddedREnvPtr ) [ m_name . c_str ( ) ] ; if ( m_RcppVector . size ( ) == 0 ) { m_strLenOrInd = SQL_NULL_DATA ; } else { SQLSMALLINT nullable = SQL_NO_NULLS ; RTypeUtils :: FillDataFromNumericVector ( 1 , m_RcppVector , & m_value , & m_strLenOrInd , nullable , m_decimalDigits , m_precision ) ; } } else { m_strLenOrInd = SQL_NULL_DATA ; } }
Name: RNumericParam::RetrieveValueAndStrLenInd
Description:
Retrieves data from m_RcppVector, fills it in m_value and sets m_strLenOrInd accordingly.
Name : RNumericParam :: RetrieveValueAndStrLenInd Description : Retrieves data from m_RcppVector fills it in m_value and sets m_strLenOrInd accordingly .
// rowsNumber