Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

terimber_db_value_vector Class Reference

#include <memdbacc.h>

Inheritance diagram for terimber_db_value_vector:

terimber_db_value_vector_impl

List of all members.

Public Member Functions

virtual size_t get_size () const =0
 gets vector size
virtual bool set_value_as_null (size_t index, dbtypes type)=0
 sets value as a null
virtual bool set_value_as_bool (size_t index, bool val)=0
 sets value as a boolean
virtual bool set_value_as_char (size_t index, sb1_t val)=0
 sets value as a char
virtual bool set_value_as_byte (size_t index, ub1_t val)=0
 sets value as a byte
virtual bool set_value_as_short (size_t index, sb2_t val)=0
 sets value as a short
virtual bool set_value_as_word (size_t index, ub2_t val)=0
 sets value as a unsigned short
virtual bool set_value_as_long (size_t index, sb4_t val)=0
 sets value as a long
virtual bool set_value_as_dword (size_t index, ub4_t val)=0
 sets value as a unsigned long
virtual bool set_value_as_float (size_t index, float val)=0
 sets value as a float
virtual bool set_value_as_double (size_t index, double val)=0
 sets value as a double
virtual bool set_value_as_long64 (size_t index, sb8_t val)=0
 sets value as a signed int64
virtual bool set_value_as_dword64 (size_t index, ub8_t val)=0
 sets value as a unsigned int64
virtual bool set_value_as_guid (size_t index, const guid_t &val)=0
 sets value as a guid
virtual bool set_value_as_numeric (size_t index, const char *val, char delimeter)=0
 sets value as a numeric
virtual bool set_value_as_decimal (size_t index, const char *val, char delimeter)=0
 sets value as a decimal
virtual bool set_value_as_date (size_t index, ub4_t year, ub1_t month, ub1_t day, ub1_t hour, ub1_t minute, ub1_t second, ub2_t millisec)=0
 sets value as a date
virtual bool set_value_as_string (size_t index, const char *val, size_t len)=0
 sets value as a string for 0 terminated string len can be -1
virtual bool set_value_as_string_ptr (size_t index, const char *val)=0
 sets value as a string pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed. it is supposed to work only for input parameters, not for output or input/output ones
virtual bool set_value_as_wstring (size_t index, const wchar_t *val, size_t len)=0
 sets value as a wide string for 0 terminated string len can be -1
virtual bool set_value_as_wstring_ptr (size_t index, const wchar_t *val)=0
 sets value as a wide string pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed.
virtual bool set_value_as_binary (size_t index, const ub1_t *val, size_t len)=0
 sets value as a binary val points to the valid buffer of raw byte of "len" length
virtual bool set_value_as_binary_ptr (size_t index, const ub1_t *val)=0
 sets value as a binary pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed. the format of buffer must be as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data it is supposed to work only for input parameters, not for output or input/output ones
virtual bool get_value_is_null (size_t index) const =0
 check if value is null
virtual bool get_value_as_bool (size_t index) const =0
 get value as boolean
virtual sb1_t get_value_as_char (size_t index) const =0
 get value as char
virtual ub1_t get_value_as_byte (size_t index) const =0
 get value as byte
virtual sb2_t get_value_as_short (size_t index) const =0
 get value as short
virtual ub2_t get_value_as_word (size_t index) const =0
 get value as unsigned short
virtual sb4_t get_value_as_long (size_t index) const =0
 get value as long
virtual ub4_t get_value_as_dword (size_t index) const =0
 get value as unsigned long
virtual float get_value_as_float (size_t index) const =0
 get value as float
virtual double get_value_as_double (size_t index) const =0
 get value as double
virtual sb8_t get_value_as_long64 (size_t index) const =0
 get value as int32
virtual ub8_t get_value_as_dword64 (size_t index) const =0
 get value as unsigned int32
virtual bool get_value_as_guid (size_t index, guid_t &val) const =0
 get value as guid for high performance we are using reference
virtual const char * get_value_as_numeric (size_t index, char delimeter) const =0
 get value as numeric
virtual const char * get_value_as_decimal (size_t index, char delimeter) const =0
 get value as deciaml
virtual bool get_value_as_date (size_t index, ub4_t &year, ub1_t &month, ub1_t &day, ub1_t &hour, ub1_t &minute, ub1_t &second, ub2_t &millisec, ub1_t &wday, ub2_t &yday) const =0
 get value as date
virtual const char * get_value_as_string (size_t index) const =0
 gets value as a string function returns the pointer to string
virtual const wchar_tget_value_as_wstring (size_t index) const =0
 gets value as a wide string function returns the pointer to wide string
virtual const ub1_tget_value_as_binary (size_t index, size_t &len) const =0
 gets value as a binary returns pointer to the raw bytes size of bytes is put to len
virtual const ub1_tget_value_as_binary_ptr (size_t index) const =0
 gets value as a binary pointer for reusing only the format of buffer is as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data

Protected Member Functions

virtual ~terimber_db_value_vector ()
 destructor


Detailed Description

Definition at line 72 of file memdbacc.h.


Constructor & Destructor Documentation

virtual terimber_db_value_vector::~terimber_db_value_vector (  )  [inline, protected, virtual]

destructor

Definition at line 77 of file memdbacc.h.


Member Function Documentation

virtual size_t terimber_db_value_vector::get_size (  )  const [pure virtual]

gets vector size

Implemented in terimber_db_value_vector_impl.

Referenced by memtable::insert_row().

virtual bool terimber_db_value_vector::set_value_as_null ( size_t  index,
dbtypes  type 
) [pure virtual]

sets value as a null

sets condition value

Parameters:
index  index
type  db type

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_bool ( size_t  index,
bool  val 
) [pure virtual]

sets value as a boolean

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_char ( size_t  index,
sb1_t  val 
) [pure virtual]

sets value as a char

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_byte ( size_t  index,
ub1_t  val 
) [pure virtual]

sets value as a byte

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_short ( size_t  index,
sb2_t  val 
) [pure virtual]

sets value as a short

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_word ( size_t  index,
ub2_t  val 
) [pure virtual]

sets value as a unsigned short

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_long ( size_t  index,
sb4_t  val 
) [pure virtual]

sets value as a long

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_dword ( size_t  index,
ub4_t  val 
) [pure virtual]

sets value as a unsigned long

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_float ( size_t  index,
float  val 
) [pure virtual]

sets value as a float

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_double ( size_t  index,
double  val 
) [pure virtual]

sets value as a double

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_long64 ( size_t  index,
sb8_t  val 
) [pure virtual]

sets value as a signed int64

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_dword64 ( size_t  index,
ub8_t  val 
) [pure virtual]

sets value as a unsigned int64

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_guid ( size_t  index,
const guid_t val 
) [pure virtual]

sets value as a guid

Parameters:
index  index
val  value

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_numeric ( size_t  index,
const char *  val,
char  delimeter 
) [pure virtual]

sets value as a numeric

Parameters:
index  index
val  value
delimeter  delimeter

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_decimal ( size_t  index,
const char *  val,
char  delimeter 
) [pure virtual]

sets value as a decimal

Parameters:
index  index
val  value
delimeter  delimeter

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_date ( size_t  index,
ub4_t  year,
ub1_t  month,
ub1_t  day,
ub1_t  hour,
ub1_t  minute,
ub1_t  second,
ub2_t  millisec 
) [pure virtual]

sets value as a date

Parameters:
index  index
year  years [0-1000000]
month  months [1 - 12]
day  days [1 - 31]
hour  hours [0 - 23]
minute  minutes [0 - 59]
second  seconds [0 - 59]
millisec  milliseconds [0 - 999]

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_string ( size_t  index,
const char *  val,
size_t  len 
) [pure virtual]

sets value as a string for 0 terminated string len can be -1

Parameters:
index  index
val  string pointer
len  string length

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_string_ptr ( size_t  index,
const char *  val 
) [pure virtual]

sets value as a string pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed. it is supposed to work only for input parameters, not for output or input/output ones

Parameters:
index  index
val  string pointer

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_wstring ( size_t  index,
const wchar_t val,
size_t  len 
) [pure virtual]

sets value as a wide string for 0 terminated string len can be -1

Parameters:
index  index
val  string pointer
len  string length

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_wstring_ptr ( size_t  index,
const wchar_t val 
) [pure virtual]

sets value as a wide string pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed.

Parameters:
index  index
val  string pointer

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_binary ( size_t  index,
const ub1_t val,
size_t  len 
) [pure virtual]

sets value as a binary val points to the valid buffer of raw byte of "len" length

Parameters:
index  index
val  value pointer
len  length of bytes

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::set_value_as_binary_ptr ( size_t  index,
const ub1_t val 
) [pure virtual]

sets value as a binary pointer to avoid copying already allocated memory, only the pointer can be used be careful! the caller is responsible for the life time of the provided pointer, which has to be valid until the sql statement has been executed. the format of buffer must be as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data it is supposed to work only for input parameters, not for output or input/output ones

Parameters:
index  index
val  value pointer

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::get_value_is_null ( size_t  index  )  const [pure virtual]

check if value is null

get values

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::get_value_as_bool ( size_t  index  )  const [pure virtual]

get value as boolean

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual sb1_t terimber_db_value_vector::get_value_as_char ( size_t  index  )  const [pure virtual]

get value as char

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual ub1_t terimber_db_value_vector::get_value_as_byte ( size_t  index  )  const [pure virtual]

get value as byte

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual sb2_t terimber_db_value_vector::get_value_as_short ( size_t  index  )  const [pure virtual]

get value as short

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual ub2_t terimber_db_value_vector::get_value_as_word ( size_t  index  )  const [pure virtual]

get value as unsigned short

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual sb4_t terimber_db_value_vector::get_value_as_long ( size_t  index  )  const [pure virtual]

get value as long

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual ub4_t terimber_db_value_vector::get_value_as_dword ( size_t  index  )  const [pure virtual]

get value as unsigned long

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual float terimber_db_value_vector::get_value_as_float ( size_t  index  )  const [pure virtual]

get value as float

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual double terimber_db_value_vector::get_value_as_double ( size_t  index  )  const [pure virtual]

get value as double

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual sb8_t terimber_db_value_vector::get_value_as_long64 ( size_t  index  )  const [pure virtual]

get value as int32

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual ub8_t terimber_db_value_vector::get_value_as_dword64 ( size_t  index  )  const [pure virtual]

get value as unsigned int32

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::get_value_as_guid ( size_t  index,
guid_t val 
) const [pure virtual]

get value as guid for high performance we are using reference

Parameters:
index  index
val  [out] value

Implemented in terimber_db_value_vector_impl.

virtual const char* terimber_db_value_vector::get_value_as_numeric ( size_t  index,
char  delimeter 
) const [pure virtual]

get value as numeric

Parameters:
index  index
delimeter  delimeter

Implemented in terimber_db_value_vector_impl.

virtual const char* terimber_db_value_vector::get_value_as_decimal ( size_t  index,
char  delimeter 
) const [pure virtual]

get value as deciaml

Parameters:
index  index
delimeter  delimeter

Implemented in terimber_db_value_vector_impl.

virtual bool terimber_db_value_vector::get_value_as_date ( size_t  index,
ub4_t year,
ub1_t month,
ub1_t day,
ub1_t hour,
ub1_t minute,
ub1_t second,
ub2_t millisec,
ub1_t wday,
ub2_t yday 
) const [pure virtual]

get value as date

Parameters:
index  index
year  [out] year [0-1000000]
month  [out] month [1-12]
day  [out] day [1-31]
hour  [out] hour [0-23]
minute  [out] minute [0-59]
second  [out] second [0-59]
millisec  [out] millisecond [0-999]
wday  [out] day of week [1-7]
yday  [out] day of year [1-366]

Implemented in terimber_db_value_vector_impl.

virtual const char* terimber_db_value_vector::get_value_as_string ( size_t  index  )  const [pure virtual]

gets value as a string function returns the pointer to string

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual const wchar_t* terimber_db_value_vector::get_value_as_wstring ( size_t  index  )  const [pure virtual]

gets value as a wide string function returns the pointer to wide string

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.

virtual const ub1_t* terimber_db_value_vector::get_value_as_binary ( size_t  index,
size_t &  len 
) const [pure virtual]

gets value as a binary returns pointer to the raw bytes size of bytes is put to len

Parameters:
index  index
len  [out] length

Implemented in terimber_db_value_vector_impl.

virtual const ub1_t* terimber_db_value_vector::get_value_as_binary_ptr ( size_t  index  )  const [pure virtual]

gets value as a binary pointer for reusing only the format of buffer is as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data

Parameters:
index  index

Implemented in terimber_db_value_vector_impl.


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


© Copyright Terimber 2003-.