language-extensions/python/test/src/PythonGetResultColumnTests.cpp
// Name: TestGetResultColumn
//
// Description:
//  Test GetResultColumn to verify the expected result column information is obtained.
//

TestGetResultColumn
Description:
Test GetResultColumn to verify the expected result column information is obtained.
TestGetResultColumn Description : Test GetResultColumn to verify the expected result column information is obtained .
void PythonExtensionApiTests::TestGetResultColumn(
		SQLUSMALLINT columnNumber,
		SQLSMALLINT  expectedDataType,
		SQLULEN      expectedColumnSize,
		SQLSMALLINT  expectedDecimalDigits,
		SQLSMALLINT  expectedNullable)
	{
		SQLSMALLINT dataType = 0;
		SQLULEN columnSize = 0;
		SQLSMALLINT decimalDigits = 0;
		SQLSMALLINT nullable = 0;
		SQLRETURN result = GetResultColumn(
			*m_sessionId,
			m_taskId,
			columnNumber,
			&dataType,
			&columnSize,
			&decimalDigits,
			&nullable);
		ASSERT_EQ(result, SQL_SUCCESS);
		EXPECT_EQ(dataType, expectedDataType);
		EXPECT_EQ(columnSize, expectedColumnSize);
		EXPECT_EQ(decimalDigits, expectedDecimalDigits);
		EXPECT_EQ(nullable, expectedNullable);
	}
void PythonExtensionApiTests :: TestGetResultColumn ( SQLUSMALLINT columnNumber , SQLSMALLINT expectedDataType , SQLULEN expectedColumnSize , SQLSMALLINT expectedDecimalDigits , SQLSMALLINT expectedNullable ) { SQLSMALLINT dataType = 0 ; SQLULEN columnSize = 0 ; SQLSMALLINT decimalDigits = 0 ; SQLSMALLINT nullable = 0 ; SQLRETURN result = GetResultColumn ( * m_sessionId , m_taskId , columnNumber , & dataType , & columnSize , & decimalDigits , & nullable ) ; ASSERT_EQ ( result , SQL_SUCCESS ) ; EXPECT_EQ ( dataType , expectedDataType ) ; EXPECT_EQ ( columnSize , expectedColumnSize ) ; EXPECT_EQ ( decimalDigits , expectedDecimalDigits ) ; EXPECT_EQ ( nullable , expectedNullable ) ; }
Name: TestGetResultColumn
Description:
Test GetResultColumn to verify the expected result column information is obtained.
Name : TestGetResultColumn Description : Test GetResultColumn to verify the expected result column information is obtained .