mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-31 16:04:27 +02:00
Poco::Data::SQLite data types #703
This commit is contained in:
parent
126f9e1742
commit
ccefee0d55
@ -93,10 +93,11 @@ Utility::Utility()
|
||||
_types.insert(TypeMap::value_type("INTEGER16", MetaColumn::FDT_INT16));
|
||||
_types.insert(TypeMap::value_type("UINT", MetaColumn::FDT_UINT32));
|
||||
_types.insert(TypeMap::value_type("UINT32", MetaColumn::FDT_UINT32));
|
||||
_types.insert(TypeMap::value_type("UINTEGER", MetaColumn::FDT_UINT64));
|
||||
_types.insert(TypeMap::value_type("UINTEGER32", MetaColumn::FDT_UINT32));
|
||||
_types.insert(TypeMap::value_type("INT", MetaColumn::FDT_INT32));
|
||||
_types.insert(TypeMap::value_type("INT32", MetaColumn::FDT_INT32));
|
||||
_types.insert(TypeMap::value_type("INTEGER", MetaColumn::FDT_INT32));
|
||||
_types.insert(TypeMap::value_type("INTEGER", MetaColumn::FDT_INT64));
|
||||
_types.insert(TypeMap::value_type("INTEGER32", MetaColumn::FDT_INT32));
|
||||
_types.insert(TypeMap::value_type("UINT64", MetaColumn::FDT_UINT64));
|
||||
_types.insert(TypeMap::value_type("ULONG", MetaColumn::FDT_INT64));
|
||||
|
@ -82,6 +82,7 @@ using Poco::NotImplementedException;
|
||||
using Poco::Data::SQLite::ConstraintViolationException;
|
||||
using Poco::Data::SQLite::ParameterCountMismatchException;
|
||||
using Poco::Int32;
|
||||
using Poco::Int64;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::Data::SQLite::Utility;
|
||||
using Poco::delegate;
|
||||
@ -1937,13 +1938,13 @@ void SQLiteTest::testInternalExtraction()
|
||||
assert (3 == rset2.columnCount());
|
||||
assert (4 == rset2.rowCount());
|
||||
|
||||
Int32 a = rset.value<Int32>(0,2);
|
||||
Int32 a = rset.value<Int64>(0,2);
|
||||
assert (3 == a);
|
||||
|
||||
int c = rset2.value(0);
|
||||
assert (1 == c);
|
||||
|
||||
Int32 b = rset2.value<Int32>("InT0",2);
|
||||
Int32 b = rset2.value<Int64>("InT0",2);
|
||||
assert (3 == b);
|
||||
|
||||
double d = rset.value<double>(1,0);
|
||||
@ -1952,7 +1953,7 @@ void SQLiteTest::testInternalExtraction()
|
||||
std::string s = rset.value<std::string>(2,1);
|
||||
assert ("4" == s);
|
||||
|
||||
typedef std::deque<Int32> IntDeq;
|
||||
typedef std::deque<Int64> IntDeq;
|
||||
|
||||
const Column<IntDeq>& col = rset.column<IntDeq>(0);
|
||||
assert (col[0] == 1);
|
||||
@ -2279,7 +2280,7 @@ void SQLiteTest::testAny()
|
||||
f = 0.0;
|
||||
s = std::string("");
|
||||
tmp << "SELECT * FROM Anys", into(i), into(f), into(s), now;
|
||||
assert (AnyCast<Int32>(i) == 42);
|
||||
assert (AnyCast<Int64>(i) == 42);
|
||||
assert (AnyCast<double>(f) == 42.5);
|
||||
assert (AnyCast<std::string>(s) == "42");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user