mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-11-10 05:47:08 +01:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
1 parent
e0e34b4030
commit
4a6bfc086c
6219 files changed
+1209835
-454916
No files matched your search
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// TestStatementImpl.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "TestStatementImpl.h"
|
||||
#include "SessionImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace Test {
|
||||
|
||||
|
||||
TestStatementImpl::TestStatementImpl(SessionImpl& rSession):
|
||||
Poco::Data::StatementImpl(rSession),
|
||||
_compiled(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TestStatementImpl::~TestStatementImpl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void TestStatementImpl::compileImpl()
|
||||
{
|
||||
// prepare binding
|
||||
_ptrBinder = new Binder;
|
||||
_ptrExtractor = new Extractor;
|
||||
_ptrPreparation = new Preparator;
|
||||
_compiled = true;
|
||||
}
|
||||
|
||||
|
||||
bool TestStatementImpl::canBind() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void TestStatementImpl::bindImpl()
|
||||
{
|
||||
// bind
|
||||
using Bindings = Poco::Data::AbstractBindingVec;
|
||||
Bindings& binds = bindings();
|
||||
if (binds.empty())
|
||||
return;
|
||||
|
||||
Bindings::iterator it = binds.begin();
|
||||
Bindings::iterator itEnd = binds.end();
|
||||
std::size_t pos = 0;
|
||||
for (; it != itEnd && (*it)->canBind(); ++it)
|
||||
{
|
||||
(*it)->bind(pos);
|
||||
pos += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::size_t TestStatementImpl::columnsReturned() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const MetaColumn& TestStatementImpl::metaColumn(std::size_t pos) const
|
||||
{
|
||||
static MetaColumn c(pos, "", MetaColumn::FDT_BOOL, 0);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
bool TestStatementImpl::hasNext()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::size_t TestStatementImpl::next()
|
||||
{
|
||||
Poco::Data::AbstractExtractionVec::iterator it = extractions().begin();
|
||||
Poco::Data::AbstractExtractionVec::iterator itEnd = extractions().end();
|
||||
std::size_t pos = 0;
|
||||
for (; it != itEnd; ++it)
|
||||
{
|
||||
(*it)->extract(pos);
|
||||
pos += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
|
||||
return 1u;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::Test
|
||||
Reference in new issue
Block a user