Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24617
Modified Files:
dbdriver.cpp world.cpp
Log Message:
This should remove the need for the `` patch to SQLite.
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** dbdriver.cpp 13 Aug 2004 08:55:25 -0000 1.40
--- dbdriver.cpp 16 Aug 2004 14:58:59 -0000 1.41
***************
*** 269,273 ****
static PyMethodDef wpDbResultMethods[] =
{
! {"free", ( getattrofunc ) wpDbResult_free, METH_VARARGS, 0}, {"fetchrow", ( getattrofunc ) wpDbResult_fetchrow, METH_VARARGS, 0}, {"getint", ( getattrofunc ) wpDbResult_getint, METH_VARARGS, 0}, {"getstring", ( getattrofunc ) wpDbResult_getstring, METH_VARARGS, 0}, {0, 0, 0, 0}
};
--- 269,277 ----
static PyMethodDef wpDbResultMethods[] =
{
! { "free", ( getattrofunc ) wpDbResult_free, METH_VARARGS, 0 },
! { "fetchrow", ( getattrofunc ) wpDbResult_fetchrow, METH_VARARGS, 0 },
! { "getint", ( getattrofunc ) wpDbResult_getint, METH_VARARGS, 0 },
! { "getstring", ( getattrofunc ) wpDbResult_getstring, METH_VARARGS, 0 },
! { 0, 0, 0, 0 }
};
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** world.cpp 15 Aug 2004 20:54:16 -0000 1.112
--- world.cpp 16 Aug 2004 14:58:59 -0000 1.113
***************
*** 955,959 ****
}
! cDBResult res = PersistentBroker::instance()->query( QString( "SELECT `value` FROM `settings` WHERE `option` = '%1'" ).arg( PersistentBroker::instance()->quoteString( name ) ) );
if ( !res.fetchrow() )
--- 955,959 ----
}
! cDBResult res = PersistentBroker::instance()->query( QString( "SELECT option,value FROM settings WHERE option='%1' LIMIT 1;" ).arg( PersistentBroker::instance()->quoteString( name ) ) );
if ( !res.fetchrow() )
***************
*** 963,967 ****
else
{
! value = res.getString( 0 );
}
res.free();
--- 963,967 ----
else
{
! value = res.getString( 1 );
}
res.free();
***************
*** 1001,1011 ****
// check if the option already exists
! PersistentBroker::instance()->executeQuery( QString( "DELETE FROM `settings` WHERE `option` = '%1'" ).arg( PersistentBroker::instance()->quoteString( name ) ) );
!
! QString sql;
! sql = "INSERT INTO `settings` VALUES('%1','%2')";
! sql = sql.arg( PersistentBroker::instance()->quoteString( name ), PersistentBroker::instance()->quoteString( value ) );
! PersistentBroker::instance()->executeQuery( sql );
if ( newconnection )
--- 1001,1007 ----
// check if the option already exists
! PersistentBroker::instance()->addToDeleteQueue( "settings", QString( "option = '%1'" ).arg( name ) );
! PersistentBroker::instance()->executeQuery( QString( "REPLACE INTO settings VALUES( '%1', '%2' );" ).arg( PersistentBroker::instance()->quoteString( name ), PersistentBroker::instance()->quoteString( value ) ) );
if ( newconnection )
|