Public Member Functions | List of all members
AppSecInc::Databases::ODBC::ODBCColumn Class Reference

An ODBC column. More...

#include <Column.h>

Inheritance diagram for AppSecInc::Databases::ODBC::ODBCColumn:
AppSecInc::Databases::ODBC::ODBCBuffer

Public Member Functions

bool IsBound () const
 returns true if the column has been bound to a statement More...
 
void operator= (const ODBCColumn &)
 copy operator for data only, not binding More...
 
const std::wstring & GetName () const
 get the name of the column More...
 
void BindAt (SQLHANDLE hstmt, int index)
 bind the column to a statement at a given index More...
 
void GetDataAt (SQLHANDLE hstmt, int index)
 get all column data More...
 
 ODBCColumn (const ODBCColumn &column)
 
 ODBCColumn (const std::wstring &name, SQLSMALLINT type, SQLINTEGER size=ODBCBuffer::INVALID_SIZE)
 
virtual ~ODBCColumn ()
 
- Public Member Functions inherited from AppSecInc::Databases::ODBC::ODBCBuffer
virtual void operator= (const ODBCBuffer &)
 copy operator, data will be copied More...
 
SQLINTEGER GetDataSize () const
 get the size of the data More...
 
int GetBufferSize () const
 get the size of the buffer More...
 
SQLSMALLINT GetType () const
 get the type of data More...
 
 ODBCBuffer ()
 constructors More...
 
 ODBCBuffer (SQLSMALLINT type, SQLINTEGER size)
 
 ODBCBuffer (const std::wstring &value)
 
 ODBCBuffer (const std::string &value)
 
 ODBCBuffer (const SYSTEMTIME &value)
 
 ODBCBuffer (const GUID &value)
 
 ODBCBuffer (bool value)
 
 ODBCBuffer (int value)
 
 ODBCBuffer (char value)
 
 ODBCBuffer (wchar_t value)
 
 ODBCBuffer (short value)
 
 ODBCBuffer (double value)
 
 ODBCBuffer (float value)
 
 ODBCBuffer (const ODBCBuffer &Buffer)
 
virtual ~ODBCBuffer ()
 
std::string ToString () const
 convert the value to a string regardless of its internal type More...
 
std::wstring ToWString () const
 convert the value to a unicode string regardless of its internal type More...
 
std::string GetStringValue () const
 get the data as a null-terminated string, disregarding fetched data size More...
 
std::wstring GetWStringValue () const
 get the data as a null-terminated unicode string, disregarding fetched data size More...
 
const std::vector< char > & GetValue () const
 get the raw data buffer More...
 
int GetIntValue () const
 get a value of type integer (SQL_INTEGER, SQL_DECIMAL, etc.) More...
 
int GetShortValue () const
 get a value of type short (SQL_SMALLINT) More...
 
bool GetBoolValue () const
 get a value of type bool (SQL_BIT) More...
 
LONGLONG GetLongLongValue () const
 get a value of type longlong (SQL_BIGINT, etc.) More...
 
GUID GetGUIDValue () const
 get a value of type uniqueidentifier More...
 
double GetDoubleValue () const
 get a value of type double More...
 
float GetFloatValue () const
 get the value of type float More...
 
char GetCharValue () const
 get a single character value More...
 
wchar_t GetVarCharValue () const
 get a single unicode character value More...
 
DATE_STRUCT GetDate () const
 get a date structure More...
 
TIME_STRUCT GetTime () const
 get a time structure More...
 
TIMESTAMP_STRUCT GetTimeStamp () const
 get a timestamp structure More...
 

Additional Inherited Members

- Static Public Member Functions inherited from AppSecInc::Databases::ODBC::ODBCBuffer
static std::wstring SQLTypeToString (SQLSMALLINT type)
 translate a SQL type to its string representation More...
 
static SQLSMALLINT StringToSQLType (const std::wstring &type)
 translate a string to its SQL type More...
 
- Static Public Attributes inherited from AppSecInc::Databases::ODBC::ODBCBuffer
static const SQLINTEGER INVALID_SIZE = 0
 invalid data size More...
 
- Static Protected Member Functions inherited from AppSecInc::Databases::ODBC::ODBCBuffer
static SQLINTEGER GetSize (SQLSMALLINT type)
 returns the size for default types, zero otherwise More...
 
- Protected Attributes inherited from AppSecInc::Databases::ODBC::ODBCBuffer
SQLSMALLINT _type
 column type, eg. SQL_C_CHAR More...
 
SQLINTEGER _size
 the data size after a Fetch More...
 
std::vector< char > _buffer
 the data buffer More...
 

Detailed Description

An ODBC column.

Constructor & Destructor Documentation

ODBCColumn::ODBCColumn ( const ODBCColumn column)
ODBCColumn::ODBCColumn ( const std::wstring &  name,
SQLSMALLINT  type,
SQLINTEGER  size = ODBCBuffer::INVALID_SIZE 
)

ODBC column

Parameters
namecolumn name
typeSQL type
sizecolumn size in bytes
ODBCColumn::~ODBCColumn ( )
virtual

Member Function Documentation

void ODBCColumn::BindAt ( SQLHANDLE  hstmt,
int  index 
)

bind the column to a statement at a given index

void ODBCColumn::GetDataAt ( SQLHANDLE  hstmt,
int  index 
)

get all column data

const std::wstring& AppSecInc::Databases::ODBC::ODBCColumn::GetName ( ) const
inline

get the name of the column

bool AppSecInc::Databases::ODBC::ODBCColumn::IsBound ( ) const
inline

returns true if the column has been bound to a statement

void ODBCColumn::operator= ( const ODBCColumn rhs)

copy operator for data only, not binding


The documentation for this class was generated from the following files:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com