#include <value.h>
Public Member Functions | |
Value (IValue *value=0) | |
bool | operator! () const |
Returns true, if this class is not connected to a actual statement. | |
const IValue * | getImpl () const |
Returns the actual implementation-class. | |
bool | isNull () const |
Explicit data-access. | |
bool | getBool () const |
return true, when value represents boolean true. | |
int | getInt () const |
tries to convert value into an int. | |
unsigned | getUnsigned () const |
tries to convert value into an unsigned. | |
int32_t | getInt32 () const |
tries to convert value into an int32_t. | |
uint32_t | getUnsigned32 () const |
tries to convert value into an uint32_t. | |
int64_t | getInt64 () const |
tries to convert value into an int64_t. | |
uint64_t | getUnsigned64 () const |
tries to convert value into an uint64_t. | |
Decimal | getDecimal () const |
tries to convert value into a Decimal. | |
float | getFloat () const |
tries to convert value into an float. | |
double | getDouble () const |
tries to convert value into an double. | |
char | getChar () const |
returns the first character of the texte-representation. | |
std::string | getString () const |
returns the value as a string. | |
void | getString (std::string &ret) const |
fills the passed string with the value. | |
Blob | getBlob () const |
Returns the value as a blob. | |
void | getBlob (Blob &blob) const |
Returns the value as a blob. | |
Date | getDate () const |
returns the value as a Date. | |
Time | getTime () const |
returns the value as a Time. | |
Datetime | getDatetime () const |
returns the value as a Datetime. | |
operator bool () const | |
Make Value-objects implicit convertable. | |
operator int () const | |
Make Value-objects implicit convertable. | |
operator unsigned () const | |
Make Value-objects implicit convertable. | |
operator int64_t () const | |
Make Value-objects implicit convertable. | |
operator uint64_t () const | |
Make Value-objects implicit convertable. | |
operator Decimal () const | |
Make Value-objects implicit convertable. | |
operator float () const | |
Make Value-objects implicit convertable. | |
operator double () const | |
Make Value-objects implicit convertable. | |
operator char () const | |
Make Value-objects implicit convertable. | |
operator std::string () const | |
Make Value-objects implicit convertable. | |
operator Blob () const | |
Make Value-objects implicit convertable. | |
operator Date () const | |
Make Value-objects implicit convertable. | |
operator Time () const | |
Make Value-objects implicit convertable. | |
operator Datetime () const | |
Make Value-objects implicit convertable. |
bool tntdb::Value::isNull | ( | ) | const [inline] |
Explicit data-access.
The get-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::getBool | ( | ) | const [inline] |
return true, when value represents boolean true.
int tntdb::Value::getInt | ( | ) | const [inline] |
tries to convert value into an int.
unsigned tntdb::Value::getUnsigned | ( | ) | const [inline] |
tries to convert value into an unsigned.
int32_t tntdb::Value::getInt32 | ( | ) | const [inline] |
tries to convert value into an int32_t.
uint32_t tntdb::Value::getUnsigned32 | ( | ) | const [inline] |
tries to convert value into an uint32_t.
int64_t tntdb::Value::getInt64 | ( | ) | const [inline] |
tries to convert value into an int64_t.
uint64_t tntdb::Value::getUnsigned64 | ( | ) | const [inline] |
tries to convert value into an uint64_t.
float tntdb::Value::getFloat | ( | ) | const [inline] |
tries to convert value into an float.
double tntdb::Value::getDouble | ( | ) | const [inline] |
tries to convert value into an double.
char tntdb::Value::getChar | ( | ) | const [inline] |
returns the first character of the texte-representation.
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.
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.
tntdb::Value::operator bool | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator int | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator unsigned | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator int64_t | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator uint64_t | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator Decimal | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator float | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator double | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator char | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator std::string | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator Blob | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator Date | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator Time | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
tntdb::Value::operator Datetime | ( | ) | const [inline] |
Make Value-objects implicit convertable.
This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.
bool tntdb::Value::operator! | ( | ) | const [inline] |
Returns true, if this class is not connected to a actual statement.
const IValue* tntdb::Value::getImpl | ( | ) | const [inline] |
Returns the actual implementation-class.