|
|
|
Home / Open source / Terimber 2.0
terimber_db_value_vector_impl Class Referenceabstract class to set conditions for lookup
More...
#include <memdb.h>
List of all members.
|
Public Member Functions |
| terimber_db_value_vector_impl (size_t count) |
| constructor
|
virtual | ~terimber_db_value_vector_impl () |
| destructor
|
virtual size_t | get_size () const |
| gets vector size
|
virtual bool | set_value_as_null (size_t index, dbtypes type) |
| sets value as null
|
virtual bool | set_value_as_bool (size_t index, bool val) |
| sets value as a boolean
|
virtual bool | set_value_as_char (size_t index, sb1_t val) |
| sets value as a char
|
virtual bool | set_value_as_byte (size_t index, ub1_t val) |
| sets value as a byte
|
virtual bool | set_value_as_short (size_t index, sb2_t val) |
| sets value as a short
|
virtual bool | set_value_as_word (size_t index, ub2_t val) |
| sets value as an unsigned short
|
virtual bool | set_value_as_long (size_t index, sb4_t val) |
| sets value as a long
|
virtual bool | set_value_as_dword (size_t index, ub4_t val) |
| sets value as an unsigned long
|
virtual bool | set_value_as_float (size_t index, float val) |
| sets value as a float
|
virtual bool | set_value_as_double (size_t index, double val) |
| sets value as a double
|
virtual bool | set_value_as_long64 (size_t index, sb8_t val) |
| sets value as a signed int64
|
virtual bool | set_value_as_dword64 (size_t index, ub8_t val) |
| sets value as an unsigned int64
|
virtual bool | set_value_as_guid (size_t index, const guid_t &val) |
| sets value as a guid
|
virtual bool | set_value_as_numeric (size_t index, const char *val, char delimeter) |
| sets value as a numeric
|
virtual bool | set_value_as_decimal (size_t index, const char *val, char delimeter) |
| 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) |
| sets value as a date
|
virtual bool | set_value_as_string (size_t index, const char *val, size_t len) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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) |
| 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 the 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 |
| checks if the value is null
|
virtual bool | get_value_as_bool (size_t index) const |
| gets the value as a boolean
|
virtual sb1_t | get_value_as_char (size_t index) const |
| gets the value as a char
|
virtual ub1_t | get_value_as_byte (size_t index) const |
| gets the value as a byte
|
virtual sb2_t | get_value_as_short (size_t index) const |
| gets the value as a short
|
virtual ub2_t | get_value_as_word (size_t index) const |
| gets the value as an unsigned short
|
virtual sb4_t | get_value_as_long (size_t index) const |
| gets the value as a long
|
virtual ub4_t | get_value_as_dword (size_t index) const |
| gets the value as an unsigned long
|
virtual float | get_value_as_float (size_t index) const |
| gets the value as a float
|
virtual double | get_value_as_double (size_t index) const |
| gets the value as a double
|
virtual sb8_t | get_value_as_long64 (size_t index) const |
| gets the value as a int32
|
virtual ub8_t | get_value_as_dword64 (size_t index) const |
| gets the value as an unsigned int32
|
virtual bool | get_value_as_guid (size_t index, guid_t &val) const |
| gets the value as a guid for higher performance we are using reference
|
virtual const char * | get_value_as_numeric (size_t index, char delimeter) const |
| gets the value as a numeric
|
virtual const char * | get_value_as_decimal (size_t index, char delimeter) const |
| gets the value as a 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 |
| gets the value as a date
|
virtual const char * | get_value_as_string (size_t index) const |
| gets the value as a string function returns the pointer to string
|
virtual const wchar_t * | get_value_as_wstring (size_t index) const |
| gets the value as a wide string function returns the pointer to wide string
|
virtual const ub1_t * | get_value_as_binary (size_t index, size_t &len) const |
| gets the value as a binary returns pointer to the raw bytes size of bytes is put to len
|
virtual const ub1_t * | get_value_as_binary_ptr (size_t index) const |
| gets the 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
|
Public Attributes |
byte_allocator | _tmp_allocator |
| temporary allocator
|
vector< binder > | _value |
| vector of binders
|
Private Member Functions |
terimber_xml_value | get_value_as_value (size_t index, vt_types type) const |
| converts one type to the other type
|
Detailed Description
abstract class to set conditions for lookup
Definition at line 53 of file memdb.h.
Constructor & Destructor Documentation
BEGIN_TERIMBER_NAMESPACE terimber_db_value_vector_impl::terimber_db_value_vector_impl |
( |
size_t |
count |
) |
|
terimber_db_value_vector_impl::~terimber_db_value_vector_impl |
( |
|
) |
[virtual] |
Member Function Documentation
size_t terimber_db_value_vector_impl::get_size |
( |
|
) |
const [virtual] |
bool terimber_db_value_vector_impl::set_value_as_null |
( |
size_t |
index, |
|
|
dbtypes |
type | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_bool |
( |
size_t |
index, |
|
|
bool |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_char |
( |
size_t |
index, |
|
|
sb1_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_byte |
( |
size_t |
index, |
|
|
ub1_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_short |
( |
size_t |
index, |
|
|
sb2_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_word |
( |
size_t |
index, |
|
|
ub2_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_long |
( |
size_t |
index, |
|
|
sb4_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_dword |
( |
size_t |
index, |
|
|
ub4_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_float |
( |
size_t |
index, |
|
|
float |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_double |
( |
size_t |
index, |
|
|
double |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_long64 |
( |
size_t |
index, |
|
|
sb8_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_dword64 |
( |
size_t |
index, |
|
|
ub8_t |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_guid |
( |
size_t |
index, |
|
|
const guid_t & |
val | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_numeric |
( |
size_t |
index, |
|
|
const char * |
val, |
|
|
char |
delimeter | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_decimal |
( |
size_t |
index, |
|
|
const char * |
val, |
|
|
char |
delimeter | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_string |
( |
size_t |
index, |
|
|
const char * |
val, |
|
|
size_t |
len | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_string_ptr |
( |
size_t |
index, |
|
|
const char * |
val | |
|
) |
| | [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 |
Implements terimber_db_value_vector.
Definition at line 217 of file memlookup.cpp.
References _value, and base_vector< T >::size().
bool terimber_db_value_vector_impl::set_value_as_wstring |
( |
size_t |
index, |
|
|
const wchar_t * |
val, |
|
|
size_t |
len | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_wstring_ptr |
( |
size_t |
index, |
|
|
const wchar_t * |
val | |
|
) |
| | [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 |
Implements terimber_db_value_vector.
Definition at line 235 of file memlookup.cpp.
References _value, and base_vector< T >::size().
bool terimber_db_value_vector_impl::set_value_as_binary |
( |
size_t |
index, |
|
|
const ub1_t * |
val, |
|
|
size_t |
len | |
|
) |
| | [virtual] |
bool terimber_db_value_vector_impl::set_value_as_binary_ptr |
( |
size_t |
index, |
|
|
const ub1_t * |
val | |
|
) |
| | [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 the 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 |
Implements terimber_db_value_vector.
Definition at line 254 of file memlookup.cpp.
References _value, and base_vector< T >::size().
bool terimber_db_value_vector_impl::get_value_is_null |
( |
size_t |
index |
) |
const [virtual] |
bool terimber_db_value_vector_impl::get_value_as_bool |
( |
size_t |
index |
) |
const [virtual] |
sb1_t terimber_db_value_vector_impl::get_value_as_char |
( |
size_t |
index |
) |
const [virtual] |
ub1_t terimber_db_value_vector_impl::get_value_as_byte |
( |
size_t |
index |
) |
const [virtual] |
sb2_t terimber_db_value_vector_impl::get_value_as_short |
( |
size_t |
index |
) |
const [virtual] |
ub2_t terimber_db_value_vector_impl::get_value_as_word |
( |
size_t |
index |
) |
const [virtual] |
sb4_t terimber_db_value_vector_impl::get_value_as_long |
( |
size_t |
index |
) |
const [virtual] |
ub4_t terimber_db_value_vector_impl::get_value_as_dword |
( |
size_t |
index |
) |
const [virtual] |
float terimber_db_value_vector_impl::get_value_as_float |
( |
size_t |
index |
) |
const [virtual] |
double terimber_db_value_vector_impl::get_value_as_double |
( |
size_t |
index |
) |
const [virtual] |
sb8_t terimber_db_value_vector_impl::get_value_as_long64 |
( |
size_t |
index |
) |
const [virtual] |
ub8_t terimber_db_value_vector_impl::get_value_as_dword64 |
( |
size_t |
index |
) |
const [virtual] |
bool terimber_db_value_vector_impl::get_value_as_guid |
( |
size_t |
index, |
|
|
guid_t & |
val | |
|
) |
| | const [virtual] |
const char * terimber_db_value_vector_impl::get_value_as_numeric |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
gets the value as a numeric
- Parameters:
-
index |
index |
delimeter |
delimeter |
Implements terimber_db_value_vector.
Definition at line 367 of file memlookup.cpp.
References _tmp_allocator, byte_allocator::allocate(), _terimber_xml_value_::bufVal, numeric::format(), get_value_as_value(), numeric::is_zero(), numeric::parse_orcl(), numeric::precision(), numeric::scale(), numeric::sign(), and vt_numeric.
Referenced by get_value_as_decimal().
const char * terimber_db_value_vector_impl::get_value_as_decimal |
( |
size_t |
index, |
|
|
char |
delimeter | |
|
) |
| | const [virtual] |
const char * terimber_db_value_vector_impl::get_value_as_string |
( |
size_t |
index |
) |
const [virtual] |
const wchar_t * terimber_db_value_vector_impl::get_value_as_wstring |
( |
size_t |
index |
) |
const [virtual] |
const ub1_t * terimber_db_value_vector_impl::get_value_as_binary |
( |
size_t |
index, |
|
|
size_t & |
len | |
|
) |
| | const [virtual] |
const ub1_t * terimber_db_value_vector_impl::get_value_as_binary_ptr |
( |
size_t |
index |
) |
const [virtual] |
converts one type to the other type
- Parameters:
-
index |
index |
type |
output type |
Definition at line 450 of file memlookup.cpp.
References exception::_throw(), _tmp_allocator, _value, dbserver_impl::convert_types(), parse_value(), persist_value(), byte_allocator::reset(), and base_vector< T >::size().
Referenced by get_value_as_binary(), get_value_as_binary_ptr(), get_value_as_bool(), get_value_as_byte(), get_value_as_char(), get_value_as_date(), get_value_as_double(), get_value_as_dword(), get_value_as_dword64(), get_value_as_float(), get_value_as_guid(), get_value_as_long(), get_value_as_long64(), get_value_as_numeric(), get_value_as_short(), get_value_as_string(), get_value_as_word(), and get_value_as_wstring().
Member Data Documentation
vector of binders
Definition at line 389 of file memdb.h.
Referenced by get_size(), get_value_as_value(), get_value_is_null(), set_value_as_binary(), set_value_as_binary_ptr(), set_value_as_bool(), set_value_as_byte(), set_value_as_char(), set_value_as_date(), set_value_as_decimal(), set_value_as_double(), set_value_as_dword(), set_value_as_dword64(), set_value_as_float(), set_value_as_guid(), set_value_as_long(), set_value_as_long64(), set_value_as_null(), set_value_as_numeric(), set_value_as_short(), set_value_as_string(), set_value_as_string_ptr(), set_value_as_word(), set_value_as_wstring(), set_value_as_wstring_ptr(), and terimber_db_value_vector_impl().
The documentation for this class was generated from the following files:
|
|
|
|