summaryrefslogtreecommitdiffstats
path: root/src/dal
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a bunch of cppcheck warningsErik Schilling2013-05-021-0/+1
|
* Use nullptr instead of NULL everywhereErik Schilling2013-04-272-3/+3
|
* Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer2013-01-095-25/+25
| | | | Same thing, but shorter.
* Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer2012-03-262-15/+13
| | | | | | | | The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
* SQLite: Fixed SqLiteDataProvider::processSql handling of multiple rowsThorbjørn Lindeijer2012-03-131-5/+7
| | | | | | | | | | | When a prepared SQL statement would have returned multiple rows, this function would try to set the column header names multiple times which throws the AlreadySetException. Currently it doesn't seem that any prepared statements are meant to return multiple rows. Reviewed-by: Yohann Ferreira
* SQLite: Added a timeout for trying to acquire a database lockThorbjørn Lindeijer2012-03-041-0/+4
| | | | | | | | | | | Without a timeout, trying to write to a locked database fails immediately. Now it will only fail when it can't retrieve a write lock within a second. Still, we need to go through all the SQLite code some time, since there is a lot of error handling missing. We also need to make sure that errors are handled correctly on the higher level. Reviewed-by: Yohann Ferreira
* Micro-optimizations related to std::stringThorbjørn Lindeijer2011-03-174-7/+7
| | | | | | | | * Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram
* Removed a bunch of silly documentationThorbjørn Lindeijer2011-03-1212-117/+5
| | | | | | A C++ developer should be able to recognize a constructor and a destructor by just looking at it, so let's stop writing down the obvious. :)
* Fix a potential memleak related to binds when disconnecting with MySQL.Yohann Ferreira2010-11-142-5/+16
| | | | Trivial fix.
* Simplified the use of binding when using MySQL.Yohann Ferreira2010-11-142-47/+82
| | | | | | | | | | This permits to avoid a memleak with the former vector form and to use the 'place' variable when binding. The badly prepared statements are also a bit better handled now. With this patch, IMHO, the MySQL support is in shape. Reviewed-by: Jaxad0127.
* Renamed .hpp files into .h for consistency.Yohann Ferreira2010-11-142-2/+2
| | | | | | Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
* Fix code indentation in the sql related files.Yohann Ferreira2010-11-104-71/+70
| | | | Trivial fix.
* Trivial code convention fix, promised to thorbjorn ;)Yohann Ferreira2010-11-021-2/+4
|
* Have the PerformTransaction class automatically handle nestingThorbjørn Lindeijer2010-10-305-14/+74
| | | | | | No need to fiddle around with "startTransaction" booleans now that the helper class is a little more intelligent. When the database is already performing a transaction, no new one will be started.
* Introduced a helper class for performing transactionsThorbjørn Lindeijer2010-10-302-0/+42
| | | | | | Avoids having to remember to call rollbackTransaction and makes transactions exception-safe (since the destructor of PerformTransaction will be called when an exception is thrown).
* Update Copyright date for Manaserv.Bertram2010-02-0713-13/+13
|
* Fixing the mysql backend and the mysql createTables scriptBlue2010-01-102-1/+167
| | | | Implementing the prepared statements in mysql backend
* Moved DALStorage documentation into source fileThorbjørn Lindeijer2009-12-062-21/+6
| | | | | | | | | Some methods were documented twice. Stuff moved to source file since this keeps the header more readable, and makes it easier to keep the documentation up to date with the implementation. Also, my IDE jumps to the definition when navigating. Removed two methods that were without an implementation.
* Removed obsolete commented out code from DALStorageThorbjørn Lindeijer2009-12-061-17/+0
|
* Fixed name of the project in copyright headersThorbjørn Lindeijer2009-12-0613-171/+170
| | | | | | Also updated the headers to refer to the GPL by URL instead of suggesting to contact the FSF by snail mail, as per the latest GPL usage instructions.
* Removed "TMW" and "TMWSERV" from header guardsThorbjørn Lindeijer2009-12-067-21/+21
|
* A host of code style changesThorbjørn Lindeijer2009-12-0613-275/+130
| | | | | | Removed pointless void in method parameter lists, fixed methods and variables that started with upper case, removed pointless 'const' for stuff passed by value, made some getters const, etc.
* Rebranding tmwserv to manaservThorbjørn Lindeijer2009-10-242-4/+4
| | | | | Includes a database update. Use update_6_to_7.sql to update existing sqlite databases.
* Fixed crash when column value is a real NULL value instead of empty string.Andreas Habel2009-09-151-1/+3
|
* Changed BindInteger and BindString to BindValueDavid Athay2009-07-103-29/+10
|
* Changed database to using prepared statements, to stop SQL injection attacksDavid Athay2009-07-104-7/+128
|
* Fixed a few code style issuesBjørn Lindeijer2009-05-241-2/+2
| | | | Also renamed Guild::totalMembers to Guild::memberCount
* Mysql backend, lua and NPC handlerBlue2009-05-011-8/+8
| | | | | Fix for mysql backend (again) Lua modification for integer and string ask with NPC, and closing fix.
* Mysql Backend Update mysql database to version 3 Fixed compile error with ↵Blue1122009-04-191-0/+1
| | | | mysql backend
* Fixed spellingDavid Athay2008-11-181-1/+1
|
* Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer2008-11-1613-33/+0
|
* * Account server now loads item database on startup and synchronizes ↵Andreas Habel2008-11-053-1/+25
| | | | | | tmw_items table in the database. * Added method to DataProvider to escape quotes in strings so that they can be used in SQL statements.
* Fixed a bug when trying to change password or mailaddress via client, caused ↵Andreas Habel2008-10-241-0/+2
| | | | | | by nested transactions. Fixed deletion of characters which left over garbage in sqlite.
* Add limits.h where needed.Dennis Friis2008-10-211-0/+1
|
* * Added installation scripts to set up database schemas for mysql, sqlite ↵Andreas Habel2008-09-175-41/+518
| | | | | | | | | | | | | 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
* Added weapon skill system and leveling system.Philipp Sehmisch2008-01-281-0/+4
|
* Made it compile with GCC 4.3Guillaume Melquiond2007-10-271-3/+4
|
* Deleted obsolete files. Cleaned configuration. Removed obsolete SQL tables.Guillaume Melquiond2007-08-133-8/+4
|
* Implementation of chat channels by Trapdoor.Philipp Sehmisch2007-02-273-1/+10
|
* Strengthened checks for already existing character name or email address.Guillaume Melquiond2006-08-041-10/+0
|
* First step toward a restructured class hierarchy for world actors: addGuillaume Melquiond2006-07-2713-58/+0
| | | | | | MovingObject and Player classes.
* Cleaned up unnecessary header dependencies and fixed some indentations.Björn Steinbrink2006-03-069-25/+11
|
* Grammar Corrections, and a little bit of work on getting the name of the Db.Yohann Ferreira2005-10-235-0/+30
|
* Fixed memory leak, implemented delAccount() + unit tests and now using ↵Huynh Tran2005-06-301-1/+4
| | | | reference-counted smart pointers to facilitate the memory management.
* Fixed wrong memory deallocation.Huynh Tran2005-06-291-2/+2
|
* Fixed bugs and added new unit tests.Huynh Tran2005-06-281-4/+1
|
* Recommitted changes for new PostgreSQL defines.Aaron Marks2005-06-281-2/+2
|
* Reorganized unit tests and initial release of the unit tests for the Storage ↵Huynh Tran2005-06-215-832/+4
| | | | class (to be completed).
* Fixed memory leak.Huynh Tran2005-06-211-1/+7
|
* Made sure that pointers are initalized and reset to null after deallocation ↵Huynh Tran2005-06-216-104/+129
| | | | and some reformatting.