1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-06 17:07:12 +02:00

Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin
2021-08-22 18:07:06 +03:00
parent 151077c799
commit 7a3d92d1d1
450 changed files with 25219 additions and 6528 deletions

View File

@ -690,6 +690,14 @@ void PostgreSQLTest::testDouble()
}
void PostgreSQLTest::testUUID()
{
if (!_pSession) fail ("Test not available.");
recreateUUIDsTable();
_pExecutor->uuids();
}
void PostgreSQLTest::testTuple()
{
if (!_pSession) fail ("Test not available.");
@ -986,6 +994,15 @@ void PostgreSQLTest::recreateFloatsTable()
}
void PostgreSQLTest::recreateUUIDsTable()
{
dropTable("Strings");
try { *_pSession << "CREATE TABLE Strings (str UUID)", now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreateUUIDsTable()"); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreateUUIDsTable()"); }
}
void PostgreSQLTest::recreateTuplesTable()
{
dropTable("Tuples");
@ -1110,6 +1127,7 @@ CppUnit::Test* PostgreSQLTest::suite()
CppUnit_addTest(pSuite, PostgreSQLTest, testUnsignedInts);
CppUnit_addTest(pSuite, PostgreSQLTest, testFloat);
CppUnit_addTest(pSuite, PostgreSQLTest, testDouble);
CppUnit_addTest(pSuite, PostgreSQLTest, testUUID);
CppUnit_addTest(pSuite, PostgreSQLTest, testTuple);
CppUnit_addTest(pSuite, PostgreSQLTest, testTupleVector);
CppUnit_addTest(pSuite, PostgreSQLTest, testInternalExtraction);

View File

@ -82,6 +82,7 @@ public:
void testUnsignedInts();
void testFloat();
void testDouble();
void testUUID();
void testTuple();
void testTupleVector();
@ -118,6 +119,7 @@ private:
void recreateIntsTable();
void recreateUnsignedIntsTable();
void recreateFloatsTable();
void recreateUUIDsTable();
void recreateTuplesTable();
void recreateVectorsTable();
void recreateNullableIntTable();

View File

@ -712,6 +712,29 @@ void SQLExecutor::floats()
}
void SQLExecutor::uuids()
{
std::string funct = "uuids()";
Poco::UUID data("264a1c6f-7af5-43a5-a593-377aff3d2d7d");
Poco::UUID ret;
try { *_pSession << "INSERT INTO Strings VALUES ($1)", use(data), now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
int count = 0;
try { *_pSession << "SELECT COUNT(*) FROM Strings", into(count), now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
assertTrue (count == 1);
try { *_pSession << "SELECT str FROM Strings", into(ret), now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
assertTrue (ret == data);
}
void SQLExecutor::doubles()
{
std::string funct = "floats()";
@ -1611,7 +1634,7 @@ void SQLExecutor::blobStmt()
std::string lastName("lastname");
std::string firstName("firstname");
std::string address("Address");
unsigned char BLOBData[ 10 ] = { 0,1,2,3,4,5,6,7,14,15 };
unsigned char BLOBData[ 10 ] = { 0,1,2,3,4,5,6,7,14,15 };
Poco::Data::BLOB blob(BLOBData, 10);
int count = 0;

View File

@ -25,7 +25,7 @@ public:
PB_IMMEDIATE,
PB_AT_EXEC
};
enum DataExtraction
{
DE_MANUAL,
@ -37,7 +37,7 @@ public:
void oidPostgreSQLTest(std::string host, std::string user, std::string pwd, std::string db, std::string port, const char* tableCreateString, const Oid anOIDArray[]);
/// This function verifies the PostgreSQL Column type OIDs are consistent between releases
void barebonePostgreSQLTest(std::string host, std::string user, std::string pwd, std::string db, std::string port, const char* tableCreateString);
/// This function uses "bare bone" API calls (i.e. calls are not
/// "wrapped" in PocoSQL framework structures).
@ -89,6 +89,7 @@ public:
void unsignedInts();
void floats();
void doubles();
void uuids();
void tuples();
void tupleVector();