language-extensions/R/test/src/RExtensionGetResultColumnTests.cpp
//----------------------------------------------------------------------------------------------
// Name: GetIntegerResultColumnsTest
//
// Description:
//  Tests GetResultColumn with default script expecting an OutputDataSet of Integer columns.
//
GetIntegerResultColumnsTest
Description:
Tests GetResultColumn with default script expecting an OutputDataSet of Integer columns.
GetIntegerResultColumnsTest Description : Tests GetResultColumn with default script expecting an OutputDataSet of Integer columns .
TEST_F(RExtensionApiTests, GetIntegerResultColumnsTest)
	{
		InitializeSession(
			(*m_integerInfo).GetColumnsNumber(),
			m_scriptString);
		InitializeColumns<SQLINTEGER, SQL_C_SLONG>(m_integerInfo.get());
		Execute<SQLINTEGER, Rcpp::IntegerVector, SQL_C_SLONG>(
			ColumnInfo<SQLINTEGER>::sm_rowsNumber,
			(*m_integerInfo).m_dataSet.data(),
			(*m_integerInfo).m_strLen_or_Ind.data(),
			(*m_integerInfo).m_columnNames,
			false);   validate
		GetResultColumn(0,  columnNumber
			SQL_C_SLONG,    dataType
			m_IntSize,      columnSize
			0,              decimalDigits
			SQL_NO_NULLS);  nullable
		GetResultColumn(1,  columnNumber
			SQL_C_SLONG,    dataType
			m_IntSize,      columnSize
			0,              decimalDigits
			SQL_NULLABLE);  nullable
	}
TEST_F ( RExtensionApiTests , GetIntegerResultColumnsTest ) { InitializeSession ( ( * m_integerInfo ) . GetColumnsNumber ( ) , m_scriptString ) ; InitializeColumns < SQLINTEGER , SQL_C_SLONG > ( m_integerInfo . get ( ) ) ; Execute < SQLINTEGER , Rcpp :: IntegerVector , SQL_C_SLONG > ( ColumnInfo < SQLINTEGER > :: sm_rowsNumber , ( * m_integerInfo ) . m_dataSet . data ( ) , ( * m_integerInfo ) . m_strLen_or_Ind . data ( ) , ( * m_integerInfo ) . m_columnNames , false ) ; GetResultColumn ( 0 , SQL_C_SLONG , m_IntSize , 0 , SQL_NO_NULLS ) ; GetResultColumn ( 1 , SQL_C_SLONG , m_IntSize , 0 , SQL_NULLABLE ) ; }
Name: GetIntegerResultColumnsTest
Description:
Tests GetResultColumn with default script expecting an OutputDataSet of Integer columns.
Name : GetIntegerResultColumnsTest Description : Tests GetResultColumn with default script expecting an OutputDataSet of Integer 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