language-extensions/R/src/RColumn.cpp
//--------------------------------------------------------------------------------------------------
// Name: RColumn::RColumn
//
// Description:
//  The constructor assigning the given column information to members.
//
:RColumn
Description:
The constructor assigning the given column information to members.
: RColumn Description : The constructor assigning the given column information to members .
RColumn::RColumn(
	const SQLCHAR *columnName,
	SQLSMALLINT   columnNameLength,
	SQLSMALLINT   dataType,
	SQLULEN       columnSize,
	SQLSMALLINT   decimalDigits,
	SQLSMALLINT   nullable)
{
	const char *name = static_cast<const char*>(
			static_cast<const void*>(columnName));
#if defined(_DEBUG)
	if (static_cast<size_t>(columnNameLength) != strlen(name))
	{
		throw invalid_argument("Invalid column name length, it doesn't match string length.");
	}
#endif
	 Store the information for this column
	m_name = string(name, columnNameLength);
	m_dataType = dataType;
	m_size = columnSize;
	m_decimalDigits = decimalDigits;
	m_nullable = nullable;
}
RColumn :: RColumn ( const SQLCHAR * columnName , SQLSMALLINT columnNameLength , SQLSMALLINT dataType , SQLULEN columnSize , SQLSMALLINT decimalDigits , SQLSMALLINT nullable ) { const char * name = static_cast < const char * > ( static_cast < const void * > ( columnName ) ) ; #if defined ( _DEBUG ) if ( static_cast < size_t > ( columnNameLength ) != strlen ( name ) ) { throw invalid_argument ( " " ) ; } #endif m_name = string ( name , columnNameLength ) ; m_dataType = dataType ; m_size = columnSize ; m_decimalDigits = decimalDigits ; m_nullable = nullable ; }
Name: RColumn::RColumn
Description:
The constructor assigning the given column information to members.
Name : RColumn :: RColumn Description : The constructor assigning the given column information to members .
// columnNameLength does not include the null terminator. // // Store the information for this column //