mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
few tidy-up fixes
This commit is contained in:
@@ -369,21 +369,25 @@ public:
|
||||
const std::string& getStorage() const;
|
||||
/// Returns the internal storage type for the stamement.
|
||||
|
||||
std::size_t rowsExtracted(int dataSet = -1) const;
|
||||
/// Returns the number of rows returned for current data set.
|
||||
/// Default value (-1) indicates current data set (if any).
|
||||
Poco::UInt32 columnsExtracted(int dataSet = StatementImpl::USE_CURRENT_DATA_SET) const;
|
||||
/// Returns the number of columns returned for current data set.
|
||||
/// Default value indicates current data set (if any).
|
||||
|
||||
std::size_t extractionCount() const;
|
||||
Poco::UInt32 rowsExtracted(int dataSet = StatementImpl::USE_CURRENT_DATA_SET) const;
|
||||
/// Returns the number of rows returned for current data set.
|
||||
/// Default value indicates current data set (if any).
|
||||
|
||||
Poco::UInt32 extractionCount() const;
|
||||
/// Returns the number of extraction storage buffers associated
|
||||
/// with the current data set.
|
||||
|
||||
std::size_t dataSetCount() const;
|
||||
Poco::UInt32 dataSetCount() const;
|
||||
/// Returns the number of data sets associated with the statement.
|
||||
|
||||
std::size_t nextDataSet();
|
||||
Poco::UInt32 nextDataSet();
|
||||
/// Returns the index of the next data set.
|
||||
|
||||
std::size_t previousDataSet();
|
||||
Poco::UInt32 previousDataSet();
|
||||
/// Returns the index of the previous data set.
|
||||
|
||||
bool hasMoreDataSets() const;
|
||||
@@ -699,31 +703,37 @@ inline void Statement::setStorage(const std::string& storage)
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Statement::extractionCount() const
|
||||
inline Poco::UInt32 Statement::extractionCount() const
|
||||
{
|
||||
return _pImpl->extractionCount();
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Statement::rowsExtracted(int dataSet) const
|
||||
inline Poco::UInt32 Statement::columnsExtracted(int dataSet) const
|
||||
{
|
||||
return _pImpl->columnsExtracted(dataSet);
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt32 Statement::rowsExtracted(int dataSet) const
|
||||
{
|
||||
return _pImpl->rowsExtracted(dataSet);
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Statement::dataSetCount() const
|
||||
inline Poco::UInt32 Statement::dataSetCount() const
|
||||
{
|
||||
return _pImpl->dataSetCount();
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Statement::nextDataSet()
|
||||
inline Poco::UInt32 Statement::nextDataSet()
|
||||
{
|
||||
return _pImpl->activateNextDataSet();
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Statement::previousDataSet()
|
||||
inline Poco::UInt32 Statement::previousDataSet()
|
||||
{
|
||||
return _pImpl->activatePreviousDataSet();
|
||||
}
|
||||
|
@@ -112,6 +112,8 @@ public:
|
||||
static const std::string LIST;
|
||||
static const std::string UNKNOWN;
|
||||
|
||||
static const int USE_CURRENT_DATA_SET = -1;
|
||||
|
||||
StatementImpl(SessionImpl& rSession);
|
||||
/// Creates the StatementImpl.
|
||||
|
||||
@@ -162,11 +164,11 @@ public:
|
||||
Storage getStorage() const;
|
||||
/// Returns the storage type for this statement.
|
||||
|
||||
std::size_t extractionCount() const;
|
||||
Poco::UInt32 extractionCount() const;
|
||||
/// Returns the number of extraction storage buffers associated
|
||||
/// with the statement.
|
||||
|
||||
std::size_t dataSetCount() const;
|
||||
Poco::UInt32 dataSetCount() const;
|
||||
/// Returns the number of data sets associated with the statement.
|
||||
|
||||
protected:
|
||||
@@ -218,12 +220,12 @@ protected:
|
||||
virtual AbstractBinder& binder() = 0;
|
||||
/// Returns the concrete binder used by the statement.
|
||||
|
||||
std::size_t columnsExtracted() const;
|
||||
Poco::UInt32 columnsExtracted(int dataSet = USE_CURRENT_DATA_SET) const;
|
||||
/// Returns the number of columns that the extractors handle.
|
||||
|
||||
std::size_t rowsExtracted(int dataSet = -1) const;
|
||||
/// Returns the number of rows returned for current data set.
|
||||
/// Default value (-1) indicates current data set (if any).
|
||||
Poco::UInt32 rowsExtracted(int dataSet = USE_CURRENT_DATA_SET) const;
|
||||
/// Returns the number of rows extracted for current data set.
|
||||
/// Default value (USE_CURRENT_DATA_SET) indicates current data set (if any).
|
||||
|
||||
const AbstractBindingVec& bindings() const;
|
||||
/// Returns the bindings.
|
||||
@@ -391,7 +393,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
bool isNull(std::size_t col, std::size_t row) const;
|
||||
bool isNull(Poco::UInt32 col, Poco::UInt32 row) const;
|
||||
/// Returns true if the value in [col, row] is null.
|
||||
|
||||
void forbidBulk();
|
||||
@@ -490,13 +492,6 @@ inline AbstractExtractionVec& StatementImpl::extractions()
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t StatementImpl::columnsExtracted() const
|
||||
{
|
||||
poco_assert (_curDataSet < _columnsExtracted.size());
|
||||
return _columnsExtracted[_curDataSet];
|
||||
}
|
||||
|
||||
|
||||
inline StatementImpl::State StatementImpl::getState() const
|
||||
{
|
||||
return _state;
|
||||
@@ -521,13 +516,13 @@ inline StatementImpl::Storage StatementImpl::getStorage() const
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t StatementImpl::extractionCount() const
|
||||
inline Poco::UInt32 StatementImpl::extractionCount() const
|
||||
{
|
||||
return extractions().size();
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t StatementImpl::dataSetCount() const
|
||||
inline Poco::UInt32 StatementImpl::dataSetCount() const
|
||||
{
|
||||
return _extractors.size();
|
||||
}
|
||||
@@ -539,7 +534,7 @@ inline bool StatementImpl::isStoredProcedure() const
|
||||
}
|
||||
|
||||
|
||||
inline bool StatementImpl::isNull(std::size_t col, std::size_t row) const
|
||||
inline bool StatementImpl::isNull(Poco::UInt32 col, Poco::UInt32 row) const
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -394,12 +394,25 @@ void StatementImpl::removeBind(const std::string& name)
|
||||
}
|
||||
|
||||
|
||||
std::size_t StatementImpl::rowsExtracted(int dataSet) const
|
||||
Poco::UInt32 StatementImpl::columnsExtracted(int dataSet) const
|
||||
{
|
||||
if (-1 == dataSet) dataSet = _curDataSet;
|
||||
if (USE_CURRENT_DATA_SET == dataSet) dataSet = _curDataSet;
|
||||
if (_columnsExtracted.size() > 0)
|
||||
{
|
||||
poco_assert (dataSet >= 0 && dataSet < _columnsExtracted.size());
|
||||
return _columnsExtracted[dataSet];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 StatementImpl::rowsExtracted(int dataSet) const
|
||||
{
|
||||
if (USE_CURRENT_DATA_SET == dataSet) dataSet = _curDataSet;
|
||||
if (extractions().size() > 0)
|
||||
{
|
||||
poco_assert (dataSet >= 0);
|
||||
poco_assert (dataSet >= 0 && dataSet < _extractors.size());
|
||||
if (_extractors[dataSet].size() > 0)
|
||||
return _extractors[dataSet][0]->numOfRowsHandled();
|
||||
}
|
||||
|
Reference in New Issue
Block a user