#include <Buffer.h>
Public Member Functions | |
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... | |
Static Public Member Functions | |
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 | |
static const SQLINTEGER | INVALID_SIZE = 0 |
invalid data size More... | |
Static Protected Member Functions | |
static SQLINTEGER | GetSize (SQLSMALLINT type) |
returns the size for default types, zero otherwise More... | |
Protected Attributes | |
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... | |
An ODBC column.
ODBCBuffer::ODBCBuffer | ( | ) |
constructors
ODBCBuffer::ODBCBuffer | ( | SQLSMALLINT | type, |
SQLINTEGER | size | ||
) |
ODBC buffer
type | SQL type |
size | column size in bytes; specify zero to resize automatically to the default size for the given type |
ODBCBuffer::ODBCBuffer | ( | const std::wstring & | value | ) |
ODBCBuffer::ODBCBuffer | ( | const std::string & | value | ) |
ODBCBuffer::ODBCBuffer | ( | const SYSTEMTIME & | value | ) |
ODBCBuffer::ODBCBuffer | ( | const GUID & | value | ) |
ODBCBuffer::ODBCBuffer | ( | bool | value | ) |
ODBCBuffer::ODBCBuffer | ( | int | value | ) |
ODBCBuffer::ODBCBuffer | ( | char | value | ) |
ODBCBuffer::ODBCBuffer | ( | wchar_t | value | ) |
ODBCBuffer::ODBCBuffer | ( | short | value | ) |
ODBCBuffer::ODBCBuffer | ( | double | value | ) |
ODBCBuffer::ODBCBuffer | ( | float | value | ) |
ODBCBuffer::ODBCBuffer | ( | const ODBCBuffer & | Buffer | ) |
|
virtual |
|
inline |
get a value of type bool (SQL_BIT)
|
inline |
get the size of the buffer
|
inline |
get a single character value
|
inline |
get the size of the data
|
inline |
get a date structure
|
inline |
get a value of type double
|
inline |
get the value of type float
|
inline |
get a value of type uniqueidentifier
|
inline |
get a value of type integer (SQL_INTEGER, SQL_DECIMAL, etc.)
|
inline |
get a value of type longlong (SQL_BIGINT, etc.)
|
inline |
get a value of type short (SQL_SMALLINT)
|
staticprotected |
returns the size for default types, zero otherwise
|
inline |
get the data as a null-terminated string, disregarding fetched data size
|
inline |
get a time structure
|
inline |
get a timestamp structure
|
inline |
get the type of data
|
inline |
get the raw data buffer
|
inline |
get a single unicode character value
|
inline |
get the data as a null-terminated unicode string, disregarding fetched data size
|
virtual |
copy operator, data will be copied
|
static |
translate a SQL type to its string representation
|
static |
translate a string to its SQL type
std::string ODBCBuffer::ToString | ( | void | ) | const |
convert the value to a string regardless of its internal type
std::wstring ODBCBuffer::ToWString | ( | ) | const |
convert the value to a unicode string regardless of its internal type
|
protected |
the data buffer
|
protected |
the data size after a Fetch
|
protected |
column type, eg. SQL_C_CHAR
|
static |
invalid data size
© Application Security Inc. - All Rights Reserved | http://msiext.codeplex.com |