The class Value represents a value, which is fetched from the database.
More...
#include <value.h>
The class Value represents a value, which is fetched from the database.
template<typename T >
bool tntdb::Value::get |
( |
T & |
ret | ) |
const |
|
inline |
Shorter name for getValue.
Blob tntdb::Value::getBlob |
( |
| ) |
const |
|
inline |
Returns the value as a blob.
This is more or less an alias to getString just to stress, that the data is truly binary and not some text value.
void tntdb::Value::getBlob |
( |
Blob & |
blob | ) |
const |
|
inline |
Returns the value as a blob.
bool tntdb::Value::getBool |
( |
| ) |
const |
|
inline |
return true, when value represents boolean true.
char tntdb::Value::getChar |
( |
| ) |
const |
|
inline |
returns the first character of the text-representation.
Date tntdb::Value::getDate |
( |
| ) |
const |
|
inline |
returns the value as a Date.
Datetime tntdb::Value::getDatetime |
( |
| ) |
const |
|
inline |
Decimal tntdb::Value::getDecimal |
( |
| ) |
const |
|
inline |
tries to convert value into a Decimal.
double tntdb::Value::getDouble |
( |
| ) |
const |
|
inline |
tries to convert value into an double.
float tntdb::Value::getFloat |
( |
| ) |
const |
|
inline |
tries to convert value into an float.
const IValue* tntdb::Value::getImpl |
( |
| ) |
const |
|
inline |
Returns the actual implementation-class.
int tntdb::Value::getInt |
( |
| ) |
const |
|
inline |
tries to convert value into an int.
int32_t tntdb::Value::getInt32 |
( |
| ) |
const |
|
inline |
tries to convert value into an int32_t.
int64_t tntdb::Value::getInt64 |
( |
| ) |
const |
|
inline |
tries to convert value into an int64_t.
long tntdb::Value::getLong |
( |
| ) |
const |
|
inline |
tries to convert value into an long.
short tntdb::Value::getShort |
( |
| ) |
const |
|
inline |
tries to convert value into an short.
std::string tntdb::Value::getString |
( |
| ) |
const |
|
inline |
returns the value as a string.
void tntdb::Value::getString |
( |
std::string & |
ret | ) |
const |
|
inline |
fills the passed string with the value.
this might be slightly more efficient than just returning a new string since one copy is saved.
Time tntdb::Value::getTime |
( |
| ) |
const |
|
inline |
returns the value as a Time.
unsigned tntdb::Value::getUnsigned |
( |
| ) |
const |
|
inline |
tries to convert value into an unsigned.
uint32_t tntdb::Value::getUnsigned32 |
( |
| ) |
const |
|
inline |
tries to convert value into an uint32_t.
uint64_t tntdb::Value::getUnsigned64 |
( |
| ) |
const |
|
inline |
tries to convert value into an uint64_t.
unsigned long tntdb::Value::getUnsignedLong |
( |
| ) |
const |
|
inline |
tries to convert value into an unsigned long.
unsigned short tntdb::Value::getUnsignedShort |
( |
| ) |
const |
|
inline |
tries to convert value into an unsigned short.
cxxtools::String tntdb::Value::getUString |
( |
| ) |
const |
|
inline |
returns the value as a unicode string.
void tntdb::Value::getUString |
( |
cxxtools::String & |
ret | ) |
const |
|
inline |
Explicit data-access.
The getXXX-methods return the value in the requested type. If the value can't be converted to the requested type, a exception of type tntdb::TypeError is thrown.return true, when value is null
template<typename T >
bool tntdb::Value::getValue |
( |
T & |
ret | ) |
const |
|
inline |
Explicit data-access.
The get-template return false if the value is null. Otherwise the passed reference is filled with the value. If the value can't be converted to the requested type, a exception of type tntdb::TypeError is thrown.
In contrast to the getXXX-methods the type is not specified explictely but determined by the passed reference.
The extraction is actually done using the operator>> with a l-value of const Value& and a r-value of a reference to the actual type. This operator is defined for standard types and may be defined for user defined types.
bool tntdb::Value::isNull |
( |
| ) |
const |
|
inline |
Explicit data-access.
The getXXX-methods return the value in the requested type. If the value can't be converted to the requested type, a exception of type tntdb::TypeError is thrown.return true, when value is null
bool tntdb::Value::operator! |
( |
| ) |
const |
|
inline |
Returns true, if this class is not connected to a actual statement.
The documentation for this class was generated from the following file: