added: TextStream a class similar to std::ostringstream
but with a Clear() method
the dynamic allocated buffer can be easily reused
added: DbTextStream a special version of a stream
used to create a database string query
everything is escaped by default
added: DbBase a base class with some basic methods for communicating
with the database
added: DbConn a class for managing connection to the database
changed: some refactoring in Db class
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@655 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -21,6 +21,8 @@ App::App()
|
||||
stdout_is_closed = false;
|
||||
last_sessions_save = time(0);
|
||||
|
||||
db.SetConn(db_conn);
|
||||
|
||||
plugin.SetDb(&db);
|
||||
plugin.SetConfig(&config);
|
||||
plugin.SetRequest(&request);
|
||||
@@ -131,8 +133,9 @@ return true;
|
||||
|
||||
bool App::Init()
|
||||
{
|
||||
db.Init(config.db_database, config.db_user, config.db_pass);
|
||||
db.WaitForConnection();
|
||||
db_conn.SetConnParam(config.db_database, config.db_user, config.db_pass);
|
||||
db_conn.WaitForConnection();
|
||||
db.LogQueries(config.log_db_query);
|
||||
|
||||
if( !CreateFCGISocket() )
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user