10#include <Pt/Db/IValue.h>
11#include <Pt/Db/Blob.h>
14#include <Pt/DateTime.h>
15#include <Pt/SmartPtr.h>
37 typedef std::size_t size_type;
51 bool isNull()
const {
return !_value || _value->isNull(); }
57 bool getBool()
const {
return _value->getBool(); }
63 int getInt()
const {
return _value->getInt(); }
69 unsigned getUnsigned()
const {
return _value->getUnsigned(); }
75 float getFloat()
const {
return _value->getFloat(); }
81 double getDouble()
const {
return _value->getDouble(); }
89 char getChar()
const {
return _value->getChar(); }
95 std::string
getString()
const {
return _value->getString(); }
128 {
return _value->getBlob(blobdata); }
Combined Date and Time value.
Definition DateTime.h:66
Date expressed in year, month, and day.
Definition Date.h:104
Copy-on-write binary large object.
Definition Blob.h:144
Database-value backend.
Definition IValue.h:27
unsigned getUnsigned() const
Returns the value as unsigned.
Definition Value.h:69
Time getTime() const
Returns the value as time.
Definition Value.h:107
Date getDate() const
Returns the value as date.
Definition Value.h:101
const IValue * getImpl() const
Returns the backend implementation.
Definition Value.h:121
std::string getString() const
Returns the value as string.
Definition Value.h:95
bool getBool() const
Returns the value as bool.
Definition Value.h:57
Value(IValue *value=0)
Takes ownership of the backend value.
Definition Value.h:45
bool operator!() const
Returns true if this object is not bound to a value.
Definition Value.h:117
double getDouble() const
Returns the value as double.
Definition Value.h:81
void getBlob(Blob &blobdata) const
Writes the value as binary data into blobdata.
Definition Value.h:127
DateTime getDateTime() const
Returns the value as date-time.
Definition Value.h:113
int getInt() const
Returns the value as int.
Definition Value.h:63
bool isNull() const
Returns true if the value is unbound or SQL NULL.
Definition Value.h:51
float getFloat() const
Returns the value as float.
Definition Value.h:75
char getChar() const
Returns the value as char.
Definition Value.h:89
Policy based smart pointer.
Definition SmartPtr.h:462
Time expressed in hours, minutes, seconds and milliseconds.
Definition Time.h:98
Portable SQL database access.
Core module.
Definition Allocator.h:33