language-extensions/R/test/src/RExtensionGetResultColumnTests.cpp
//----------------------------------------------------------------------------------------------
// Name: GetRealResultColumnsTest
//
// Description:
//  Tests GetResultColumn with default script using an OutputDataSet of Real columns.
//
GetRealResultColumnsTest
Description:
Tests GetResultColumn with default script using an OutputDataSet of Real columns.
GetRealResultColumnsTest Description : Tests GetResultColumn with default script using an OutputDataSet of Real columns .
TEST_F(RExtensionApiTests, GetRealResultColumnsTest)
	{
		InitializeSession(
			(*m_realInfo).GetColumnsNumber(),
			m_scriptString);
		InitializeColumns<SQLREAL, SQL_C_FLOAT>(m_realInfo.get());
		Execute<SQLREAL, Rcpp::NumericVector, SQL_C_FLOAT>(
			ColumnInfo<SQLREAL>::sm_rowsNumber,
			(*m_realInfo).m_dataSet.data(),
			(*m_realInfo).m_strLen_or_Ind.data(),
			(*m_realInfo).m_columnNames,
			false);   validate
		GetResultColumn(0,  columnNumber
			SQL_C_DOUBLE,   dataType
			m_DoubleSize,   columnSize
			0,              decimalDigits
			SQL_NO_NULLS);  nullable
		GetResultColumn(1,  columnNumber
			SQL_C_DOUBLE,   dataType
			m_DoubleSize,   columnSize
			0,              decimalDigits
			SQL_NULLABLE);  nullable
	}
TEST_F ( RExtensionApiTests , GetRealResultColumnsTest ) { InitializeSession ( ( * m_realInfo ) . GetColumnsNumber ( ) , m_scriptString ) ; InitializeColumns < SQLREAL , SQL_C_FLOAT > ( m_realInfo . get ( ) ) ; Execute < SQLREAL , Rcpp :: NumericVector , SQL_C_FLOAT > ( ColumnInfo < SQLREAL > :: sm_rowsNumber , ( * m_realInfo ) . m_dataSet . data ( ) , ( * m_realInfo ) . m_strLen_or_Ind . data ( ) , ( * m_realInfo ) . m_columnNames , false ) ; GetResultColumn ( 0 , SQL_C_DOUBLE , m_DoubleSize , 0 , SQL_NO_NULLS ) ; GetResultColumn ( 1 , SQL_C_DOUBLE , m_DoubleSize , 0 , SQL_NULLABLE ) ; }
Name: GetRealResultColumnsTest
Description:
Tests GetResultColumn with default script using an OutputDataSet of Real columns.
Name : GetRealResultColumnsTest Description : Tests GetResultColumn with default script using an OutputDataSet of Real columns .
// Initialize with a default Session that prints Hello RExtension // and assigns InputDataSet to OutputDataSet // // validate // columnNumber // dataType // columnSize // decimalDigits // nullable // columnNumber // dataType // columnSize // decimalDigits // nullable