mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
#3318: Data: Support Poco::UUID for data binding
This commit is contained in:
@@ -211,6 +211,13 @@ void Binder::bind(std::size_t pos, const Time& val, Direction dir)
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const UUID& val, Direction dir)
|
||||
{
|
||||
std::string str = val.toString();
|
||||
bind(pos, str, dir);
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const NullData&, Direction dir)
|
||||
{
|
||||
poco_assert(dir == PD_IN);
|
||||
|
||||
@@ -204,6 +204,18 @@ bool Extractor::extract(std::size_t pos, Time& val)
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, UUID& val)
|
||||
{
|
||||
std::string str;
|
||||
if (extract(pos, str))
|
||||
{
|
||||
val.parse(str);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
bool Extractor::extract(std::size_t pos, Any& val)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user