mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 04:17:55 +01:00
SF #3567118: Fix Nullable handling in trunk
This commit is contained in:
@@ -786,7 +786,8 @@ inline Extraction<T>* into(T& t, const Position& pos)
|
||||
|
||||
template <typename T>
|
||||
inline Extraction<T>* into(T& t, const Position& pos, const T& def)
|
||||
/// Convenience function to allow for a more compact creation of an extraction object with the given default
|
||||
/// Convenience function to allow for a more compact creation of an extraction object
|
||||
/// with multiple recordset support and the given default
|
||||
{
|
||||
return new Extraction<T>(t, def, pos);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ private:
|
||||
{
|
||||
C* pData = new C;
|
||||
Column<C>* pCol = new Column<C>(mc, pData);
|
||||
return new InternalExtraction<C>(*pData, pCol, static_cast<Poco::UInt32>(currentDataSet()));
|
||||
return new InternalExtraction<C>(*pData, pCol, Position(currentDataSet()));
|
||||
}
|
||||
|
||||
template <class C>
|
||||
@@ -349,7 +349,7 @@ private:
|
||||
return new InternalBulkExtraction<C>(*pData,
|
||||
pCol,
|
||||
static_cast<Poco::UInt32>(getExtractionLimit()),
|
||||
static_cast<Poco::UInt32>(currentDataSet()));
|
||||
Position(currentDataSet()));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
|
||||
if (pExt->extract(pos++, val))
|
||||
{
|
||||
obj.value(val);
|
||||
obj = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -182,6 +182,17 @@ public:
|
||||
return !(*this == other) && !(*this < other);
|
||||
}
|
||||
|
||||
C& value()
|
||||
/// Returns the Nullable's value.
|
||||
///
|
||||
/// Throws a NullValueException if the Nullable is empty.
|
||||
{
|
||||
if (!_isNull)
|
||||
return _value;
|
||||
else
|
||||
throw NullValueException();
|
||||
}
|
||||
|
||||
const C& value() const
|
||||
/// Returns the Nullable's value.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user