mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
step, date, time
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user