diff options
author | Andreas Habel <mail@exceptionfault.de> | 2008-09-17 11:32:45 +0000 |
---|---|---|
committer | Andreas Habel <mail@exceptionfault.de> | 2008-09-17 11:32:45 +0000 |
commit | a2af298fd993a129b657671a41f20e3975baf0ef (patch) | |
tree | 9e99436db881465af9738a6637ece7ef6b05fe5f /src/account-server/dalstorage.hpp | |
parent | fb677eeec95d583b8b1928a907c815c95f8c4594 (diff) | |
download | manaserv-a2af298fd993a129b657671a41f20e3975baf0ef.tar.gz manaserv-a2af298fd993a129b657671a41f20e3975baf0ef.tar.bz2 manaserv-a2af298fd993a129b657671a41f20e3975baf0ef.tar.xz manaserv-a2af298fd993a129b657671a41f20e3975baf0ef.zip |
* Added installation scripts to set up database schemas for mysql, sqlite and postgresql. The create table statements have been completely removed out from the c++ source into separate, provider specific sql files. Accountserver will no longer create a sqlite file if none present.
* Added database specific config parameters to configure each provider independent.
* Simplified the connect routine of DALStorage class since every dataprovider is now responsible to retrieve its own parameters.
* Extended abstract dataprovider to support transactions, functionally implemented for SQLite and mySQL.
* Added methods to retrieve last inserted auto-increment value and the number of modified rows by the last statement.
* Rewrite of DALStorage class to be a little more transactional.
* Fixed a bug when deleting a character. Old function left data in quests table and guilds table.
* Doxygen now also includes non-documented functions and provides a dictionary for all classes
Diffstat (limited to 'src/account-server/dalstorage.hpp')
-rw-r--r-- | src/account-server/dalstorage.hpp | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/src/account-server/dalstorage.hpp b/src/account-server/dalstorage.hpp index 099ec14a..1085a3ae 100644 --- a/src/account-server/dalstorage.hpp +++ b/src/account-server/dalstorage.hpp @@ -132,6 +132,25 @@ class DALStorage void banCharacter(int id, int duration); /** + * Delete a character in the database. + * + * @param charId character identifier. + * @param startTransaction indicates wheter the function should run in + * its own transaction or is called inline of another transaction + */ + void delCharacter(int charId, bool startTransaction) const; + + /** + * Delete a character in the database. The object itself i not touched + * by this function! + * + * @param character character object. + * @param startTransaction indicates wheter the function should run in + * its own transaction or is called inline of another transaction + */ + void delCharacter(Character *character, bool startTransaction) const; + + /** * Removes expired bans from accounts */ void checkBannedAccounts(); @@ -269,34 +288,6 @@ class DALStorage DALStorage& operator=(const DALStorage& rhs); - - /** - * Create the specified table. - * - * @param tblName the table name. - * @param sql the SQL query to execute. - * - * @exception dal::DbSqlQueryExecFailure. - */ - void - createTable(const std::string& tblName, - const std::string& sql); - - - /** - * Create an index on the specified column. - * - * @param indxName the name of the index. - * @param tblName the name of the table. - * @param columnName the name of the columns - * - * @exception dal::DbSqlQueryExecFailure. - */ - void - createIndex(const std::string& indxName, - const std::string& tblName, - const std::string& columnName ); - /** * Gets an account by using a SQL query string. * |