mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
- SQL logging channel and archiving strategy
- row formatting refactored - affected row count for insert, delete and update returned from Statement::execute() - internal SQL string formatting capability using Poco::format()
This commit is contained in:
@@ -373,6 +373,31 @@ void ODBCMySQLTest::recreateMiscTable()
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR(100),"
|
||||
"Name VARCHAR(100),"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR(100), "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR(100),"
|
||||
"DateTime DATETIME)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCMySQLTest::suite()
|
||||
{
|
||||
if (_pSession = init(_driver, _dsn, _uid, _pwd, _connectString))
|
||||
@@ -398,6 +423,7 @@ CppUnit::Test* ODBCMySQLTest::suite()
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLimit);
|
||||
@@ -447,6 +473,8 @@ CppUnit::Test* ODBCMySQLTest::suite()
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSQLLogger);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user