step, date, time

This commit is contained in:
Aleksandar Fabijanic
2007-11-10 23:21:28 +00:00
parent 95c5230389
commit fca08a18df
63 changed files with 2161 additions and 96 deletions

View File

@@ -114,6 +114,12 @@ public:
void bind(std::size_t pos, const Poco::Data::BLOB& val, Direction dir);
/// Binds a BLOB.
void bind(std::size_t pos, const Date& val, Direction dir);
/// Binds a Date.
void bind(std::size_t pos, const Time& val, Direction dir);
/// Binds a Time.
void bind(std::size_t pos, const DateTime& val, Direction dir);
/// Binds a DateTime.

View File

@@ -120,6 +120,12 @@ public:
bool extract(std::size_t pos, Poco::Data::BLOB& val);
/// Extracts a BLOB.
bool extract(std::size_t pos, Poco::Data::Date& val);
/// Extracts a Date.
bool extract(std::size_t pos, Poco::Data::Time& val);
/// Extracts a Time.
bool extract(std::size_t pos, Poco::DateTime& val);
/// Extracts a DateTime.
@@ -248,6 +254,20 @@ private:
val = b;
break;
}
case MetaColumn::FDT_DATE:
{
Date d;
ret = extract(pos, d);
val = d;
break;
}
case MetaColumn::FDT_TIME:
{
Time t;
ret = extract(pos, t);
val = t;
break;
}
case MetaColumn::FDT_TIMESTAMP:
{
DateTime dt;

View File

@@ -77,8 +77,8 @@ protected:
bool hasNext();
/// Returns true if a call to next() will return data.
void next();
/// Retrieves the next row from the resultset.
Poco::UInt32 next();
/// Retrieves the next row from the resultset and returns 1.
/// Will throw, if the resultset is empty.
bool canBind() const;

View File

@@ -57,6 +57,9 @@ class SQLite_API Utility
/// Various utility functions for SQLite, mostly return code handling
{
public:
static const std::string SQLITE_DATE_FORMAT;
static const std::string SQLITE_TIME_FORMAT;
static std::string lastError(sqlite3* pDb);
/// Retreives the last error code from sqlite and converts it to a string