language-extensions/python/test/src/PythonGetResultColumnTests.cpp
// Name: GetDateResultColumnsTest
//
// Description:
//  Test GetResultColumn with default script expecting an OutputDataSet of Date columns.
//

GetDateResultColumnsTest
Description:
Test GetResultColumn with default script expecting an OutputDataSet of Date columns.
GetDateResultColumnsTest Description : Test GetResultColumn with default script expecting an OutputDataSet of Date columns .
TEST_F(PythonExtensionApiTests, GetDateResultColumnsTest)
	{
		InitializeSession(0, 
			(*m_dateInfo).GetColumnsNumber(),
			m_scriptString);
		InitializeColumns<SQL_DATE_STRUCT, SQL_C_TYPE_DATE>(m_dateInfo.get());
		TestExecute<SQL_DATE_STRUCT, SQL_C_TYPE_DATE>(
			ColumnInfo<SQL_DATE_STRUCT>::sm_rowsNumber,
			(*m_dateInfo).m_dataSet.data(),
			(*m_dateInfo).m_strLen_or_Ind.data(),
			(*m_dateInfo).m_columnNames,
			false);
		SQLSMALLINT sizeOfDateString = 10;
		TestGetResultColumn(0, 
			SQL_C_CHAR,        
			sizeOfDateString,  
			0,                 
			SQL_NO_NULLS);     
		TestGetResultColumn(1, 
			SQL_C_CHAR,        
			sizeOfDateString,  
			0,                 
			SQL_NULLABLE);     
	}
TEST_F ( PythonExtensionApiTests , GetDateResultColumnsTest ) { InitializeSession ( 0 , ( * m_dateInfo ) . GetColumnsNumber ( ) , m_scriptString ) ; InitializeColumns < SQL_DATE_STRUCT , SQL_C_TYPE_DATE > ( m_dateInfo . get ( ) ) ; TestExecute < SQL_DATE_STRUCT , SQL_C_TYPE_DATE > ( ColumnInfo < SQL_DATE_STRUCT > :: sm_rowsNumber , ( * m_dateInfo ) . m_dataSet . data ( ) , ( * m_dateInfo ) . m_strLen_or_Ind . data ( ) , ( * m_dateInfo ) . m_columnNames , false ) ; SQLSMALLINT sizeOfDateString = 10 ; TestGetResultColumn ( 0 , SQL_C_CHAR , sizeOfDateString , 0 , SQL_NO_NULLS ) ; TestGetResultColumn ( 1 , SQL_C_CHAR , sizeOfDateString , 0 , SQL_NULLABLE ) ; }
Name: GetDateResultColumnsTest
Description:
Test GetResultColumn with default script expecting an OutputDataSet of Date columns.
Name : GetDateResultColumnsTest Description : Test GetResultColumn with default script expecting an OutputDataSet of Date columns .
// Initialize with a default Session that prints Hello PythonExtension
 // and assigns InputDataSet to OutputDataSet
 //
 // parametersNumber
 // dates are stored in python as an object column which is return as SQL_C_CHAR
 // A date like "9021-08-25" has 10 chars
 //
 // columnNumber
 // expectedDataType
 // expectedColumnSize
 // expectedDeci malDigits
 // expectedNullable
 // columnNumber
 // expectedDataType
 // expectedColumnSize
 // expectedDecimalDigits
 // expectedNullable
