17 lines
691 B
C++
17 lines
691 B
C++
#include "BlogSession.h"
|
|
#include <Wt/Dbo/FixedSqlConnectionPool.h>
|
|
|
|
BlogSession::BlogSession(Wt::Dbo::SqlConnectionPool &connectionPool)
|
|
: m_connectionPool(connectionPool), m_users(*this) {
|
|
}
|
|
|
|
std::unique_ptr<Wt::Dbo::SqlConnectionPool> BlogSession::createConnectionPool(const std::string &sqlite3) {
|
|
auto connection = std::make_unique<Wt::Dbo::backend::Sqlite3>(sqlite3);
|
|
|
|
connection->setProperty("show-queries", "true");
|
|
connection->setDateTimeStorage(Wt::Dbo::SqlDateTimeType::DateTime,
|
|
Wt::Dbo::backend::DateTimeStorage::PseudoISO8601AsText);
|
|
|
|
return std::make_unique<Wt::Dbo::FixedSqlConnectionPool>(std::move(connection), 10);
|
|
}
|