mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 05:29:41 +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>
|
template <typename T>
|
||||||
inline Extraction<T>* into(T& t, const Position& pos, const T& def)
|
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);
|
return new Extraction<T>(t, def, pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ private:
|
|||||||
{
|
{
|
||||||
C* pData = new C;
|
C* pData = new C;
|
||||||
Column<C>* pCol = new Column<C>(mc, pData);
|
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>
|
template <class C>
|
||||||
@@ -349,7 +349,7 @@ private:
|
|||||||
return new InternalBulkExtraction<C>(*pData,
|
return new InternalBulkExtraction<C>(*pData,
|
||||||
pCol,
|
pCol,
|
||||||
static_cast<Poco::UInt32>(getExtractionLimit()),
|
static_cast<Poco::UInt32>(getExtractionLimit()),
|
||||||
static_cast<Poco::UInt32>(currentDataSet()));
|
Position(currentDataSet()));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ public:
|
|||||||
|
|
||||||
if (pExt->extract(pos++, val))
|
if (pExt->extract(pos++, val))
|
||||||
{
|
{
|
||||||
obj.value(val);
|
obj = val;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -182,6 +182,17 @@ public:
|
|||||||
return !(*this == other) && !(*this < other);
|
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
|
const C& value() const
|
||||||
/// Returns the Nullable's value.
|
/// Returns the Nullable's value.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user