fix odbc build on linux

This commit is contained in:
Alex Fabijanic 2017-07-06 19:50:15 +02:00
parent c271e49247
commit 6c13f5d14c
2 changed files with 10 additions and 5 deletions

View File

@ -14,7 +14,6 @@
#include "SQLExecutor.h" #include "SQLExecutor.h"
#include "Poco/String.h" #include "Poco/String.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Tuple.h"
#include "Poco/Nullable.h" #include "Poco/Nullable.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/Dynamic/Var.h" #include "Poco/Dynamic/Var.h"

View File

@ -25,6 +25,7 @@
#include "Poco/Data/RecordSet.h" #include "Poco/Data/RecordSet.h"
#include "Poco/NumberFormatter.h" #include "Poco/NumberFormatter.h"
#include "Poco/String.h" #include "Poco/String.h"
#include "Poco/Tuple.h"
#include "Poco/Exception.h" #include "Poco/Exception.h"
#include <iostream> #include <iostream>
@ -564,18 +565,23 @@ public:
template <typename IntType = template <typename IntType =
#ifdef POCO_64_BIT #ifdef POCO_64_BIT
Poco::Int64 IntType Poco::Int64
#else #else
Poco::Int32 IntType Poco::Int32
#endif #endif
> >
void internalExtraction(IntType) void internalExtraction(IntType)
{ {
using Poco::Data::RecordSet; using Poco::Data::RecordSet;
using Poco::Data::Column; using Poco::Data::Column;
using Poco::Data::Statement;
using Poco::UTF16String; using Poco::UTF16String;
using Poco::Tuple;
using Poco::BadCastException; using Poco::BadCastException;
using Poco::RangeException; using Poco::RangeException;
using Poco::Data::ODBC::ConnectionException;
using Poco::Data::ODBC::StatementException;
using namespace Poco::Data::Keywords;
std::string funct = "internalExtraction()"; std::string funct = "internalExtraction()";
std::vector<Tuple<int, double, std::string> > v; std::vector<Tuple<int, double, std::string> > v;
@ -653,8 +659,8 @@ public:
assert (5 == i); assert (5 == i);
const Column<std::deque<IntType> >& col = rset.column<std::deque<IntType> >(0); const Column<std::deque<IntType> >& col = rset.column<std::deque<IntType> >(0);
Column<std::deque<IntType> >::Iterator it = col.begin(); typename Column<std::deque<IntType> >::Iterator it = col.begin();
Column<std::deque<IntType> >::Iterator end = col.end(); typename Column<std::deque<IntType> >::Iterator end = col.end();
for (int i = 1; it != end; ++it, ++i) for (int i = 1; it != end; ++it, ++i)
assert (*it == i); assert (*it == i);