language-extensions/R/test/src/RExtensionGetResultColumnTests.cpp
//----------------------------------------------------------------------------------------------
// Name: GetDateResultColumnsTest
//
// Description:
//  Tests GetResultColumn with default script expecting an OutputDataSet of Date columns.
//
GetDateResultColumnsTest
Description:
Tests GetResultColumn with default script expecting an OutputDataSet of Date columns.
GetDateResultColumnsTest Description : Tests GetResultColumn with default script expecting an OutputDataSet of Date columns .
TEST_F(RExtensionApiTests, GetDateResultColumnsTest)
	{
		InitializeSession(
			(*m_dateInfo).GetColumnsNumber(),
			m_scriptString,
			0);  parametersNumber
		InitializeColumns<SQL_DATE_STRUCT, SQL_C_TYPE_DATE>(m_dateInfo.get());
		ExecuteDateTime<SQL_DATE_STRUCT, Rcpp::DateVector, Rcpp::Date>(
			ColumnInfo<SQL_DATE_STRUCT>::sm_rowsNumber,
			(*m_dateInfo).m_dataSet.data(),
			(*m_dateInfo).m_strLen_or_Ind.data(),
			(*m_dateInfo).m_columnNames,
			false);   validate
		GetResultColumn(0,    columnNumber
			SQL_C_TYPE_DATE,  dataType
			m_DateSize,       columnSize
			0,                decimalDigits
			SQL_NO_NULLS);    nullable
		GetResultColumn(1,    columnNumber
			SQL_C_TYPE_DATE,  dataType
			m_DateSize,       columnSize
			0,                decimalDigits
			SQL_NULLABLE);    nullable
	}
TEST_F ( RExtensionApiTests , GetDateResultColumnsTest ) { InitializeSession ( ( * m_dateInfo ) . GetColumnsNumber ( ) , m_scriptString , 0 ) ; InitializeColumns < SQL_DATE_STRUCT , SQL_C_TYPE_DATE > ( m_dateInfo . get ( ) ) ; ExecuteDateTime < SQL_DATE_STRUCT , Rcpp :: DateVector , Rcpp :: Date > ( ColumnInfo < SQL_DATE_STRUCT > :: sm_rowsNumber , ( * m_dateInfo ) . m_dataSet . data ( ) , ( * m_dateInfo ) . m_strLen_or_Ind . data ( ) , ( * m_dateInfo ) . m_columnNames , false ) ; GetResultColumn ( 0 , SQL_C_TYPE_DATE , m_DateSize , 0 , SQL_NO_NULLS ) ; GetResultColumn ( 1 , SQL_C_TYPE_DATE , m_DateSize , 0 , SQL_NULLABLE ) ; }
Name: GetDateResultColumnsTest
Description:
Tests GetResultColumn with default script expecting an OutputDataSet of Date columns.
Name : GetDateResultColumnsTest Description : Tests GetResultColumn with default script expecting an OutputDataSet of Date columns .
// Initialize with a default session that prints Hello RExtension // and assigns InputDataSet to OutputDataSet // // parametersNumber // validate // columnNumber // dataType // columnSize // decimalDigits // nullable // columnNumber // dataType // columnSize // decimalDigits // nullable