Erik Ogenvik
446ff7b16a
Fix memory leak with PGResult.
...
The postgres db result wasn't always deleted as it should. Fix this by
using shared_ptr with a custom Deleter.
2013-09-12 22:12:49 +02:00
Olek Wojnar
7f9ff2246d
Remove CVS $Id tags
...
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
a8e80f39f8
Fixed missing return value.
2013-06-15 22:47:18 +02:00
Erik Ogenvik
88740dd726
Enable location updates of persisted entities.
2013-06-15 22:46:52 +02:00
Erik Ogenvik
873a6d7ffb
Store and restore thoughts.
...
Currently thoughts are only stored when the server is shut down. A more
proper way would probably be to query character and store their thoughts
at regular intervals while the simulation is running.
2013-04-07 23:20:23 +02:00
Alistair Riddoch
116c629f8b
Correct the format string for size_t independence
2012-11-12 22:00:33 +00:00
Alistair Riddoch
1871ab001a
Remove unnecessary conditional
2012-05-14 14:45:32 +01:00
Alistair Riddoch
1a2cb53470
Fix some stray warnings
2012-01-30 15:14:05 +00:00
Alistair Riddoch
5749d72d0e
Convert final Database methods
2011-09-29 12:15:43 +01:00
Alistair Riddoch
6c8997942f
Convert scheduleCommand and related queries
2011-09-29 12:11:15 +01:00
Alistair Riddoch
9f5fc30c5a
Convert rule clearing functions
2011-09-29 10:31:41 +01:00
Alistair Riddoch
2d987ba116
Concert Database::getTable and Persistence::getRules
2011-09-29 10:12:00 +01:00
Alistair Riddoch
84bc1c4d38
Convert the Database::*Object functions
2011-09-28 23:28:47 +01:00
Alistair Riddoch
2951975c4b
Convert Database::encodeObject
2011-09-28 23:22:18 +01:00
Alistair Riddoch
f0896b459c
Add a remdinder of an unsorted issue
2011-09-28 23:19:21 +01:00
Alistair Riddoch
bc2bf1e3c4
Add a destructor for Database
2011-09-28 23:15:46 +01:00
Alistair Riddoch
f9bf828363
Convert Database::decodeMessage
2011-09-28 23:13:13 +01:00
Alistair Riddoch
3ed69cb6f4
Convert Database::decodeObject
2011-09-28 23:01:12 +01:00
Alistair Riddoch
45f7077f4a
That _must_ have been the wrong decoder
2011-09-28 22:56:59 +01:00
Alistair Riddoch
7aa394b2ca
Converty Database::initRule
2011-09-28 22:54:35 +01:00
Alistair Riddoch
84de25e5c0
Convert Database::runCommandQuery
2011-09-28 22:46:32 +01:00
Alistair Riddoch
f457273314
Fix Database::launchNewQuery
2011-09-28 22:36:41 +01:00
Alistair Riddoch
5c4851b9c7
Switch first set of functions
...
All functions which return error/success should return int according
to the C library convention used in most of cyphesis
2011-09-28 22:32:39 +01:00
Alistair Riddoch
1c79a04701
Start cleaning up the Database API
2011-09-28 22:25:58 +01:00
Alistair Riddoch
d4ba3c13c3
Report notice messages from the databae API more cleaner.
2009-10-19 20:06:39 +01:00
Alistair Riddoch
a442f46684
Use log_formatted to handle multi-line error messaged from database API.
2009-10-19 20:01:38 +01:00
Alistair Riddoch
5d30c0e13f
Remove unused includes.
2009-08-22 17:10:42 +01:00
Alistair Riddoch
b7fdfefbe0
Remove debug output for maintenence queries
2009-04-19 00:40:21 -07:00
Al Riddoch
ebca2d0fed
2009-01-06 Al Riddoch <alriddoch@googlemail.com>
...
* server/ExternalMind.cpp: Extend the time before nuking player
characters to an hour.
2009-01-06 17:22:11 +00:00
Al Riddoch
c075ce7a11
2008-11-18 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Disable purging the database on startup.
2008-11-18 02:36:51 +00:00
Al Riddoch
9ad447d180
2008-11-17 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp, common/Database.h: Implement queries required
to read entity and properties from the database.
2008-11-17 01:36:24 +00:00
Al Riddoch
f1ba383c4c
2008-11-17 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Fix referrential integrity now that inherited
tables are not being used. Removes FIXMEs relating to that and
the database maintenance code which have now been fixed.
2008-11-17 00:40:21 +00:00
Al Riddoch
08ef6a1d2b
2008-11-16 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Clean up the formatting of a number of query
strings.
2008-11-16 23:45:51 +00:00
Al Riddoch
4b1e4af01f
2008-11-16 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Re-enable referential integrity on relational
tables. Clean up the query generation code.
* server/Persistance.cpp: Correct the table names used for the
relation used to store character ownership.
2008-11-16 23:25:34 +00:00
Al Riddoch
a2bd97a1d9
2008-11-16 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Remove the commented out code for handling
tables for the obsolete removed persistence system.
2008-11-16 22:51:43 +00:00
Al Riddoch
7abe077c79
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* common/const.h: Add a constant for the name length limit of
rule IDs and property names.
* common/Database.cpp: Use the name length constant for database
fields that will store the name.
2008-11-13 03:27:17 +00:00
Al Riddoch
725e065bec
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* server/EntityFactory.cpp: Check class names do not violate a
32 character limit before installing them, so they never get
as far as the database limit.
* common/Database.cpp: Modify the rules table so it limits
the ID to the right size.
2008-11-13 03:13:41 +00:00
Al Riddoch
143d224e24
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Remove some left over debug output.
2008-11-13 02:17:55 +00:00
Al Riddoch
66f1ce1fc5
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Change database column types to varchar to make
them cheaper to update.
2008-11-13 02:14:02 +00:00
Al Riddoch
6b04cc88d7
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Actually update the location information,
rather than just pretending.
2008-11-13 01:57:47 +00:00
Al Riddoch
585a781ef5
2008-11-13 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Handle things correctly if scheduling an update
or insert query while the database is offline. Just ignore it and
keep the query queued.
2008-11-13 01:26:16 +00:00
Al Riddoch
0e8a258cfc
2008-11-10 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Fix a problem where existing database tables
weren't added to the set for maintenance cycles. This should fix a
lot of major performance issues.
2008-11-10 03:04:33 +00:00
Al Riddoch
ebfb5ccbc4
2008-11-04 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Add the new storage tables to those that
are vacuumed regularly. Add an index to the name of properties
to make them massively more efficient to update.
2008-11-04 00:26:04 +00:00
Al Riddoch
aa39d2c526
2008-09-27 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Add an error check when escaping strings for
SQL queries.
2008-09-27 15:36:31 +00:00
Al Riddoch
447081ff9c
2008-09-08 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Add queries which purge the world state on
startup to prevent the tables from getting clogged up. Fix the
syntax of the query which removes deleted entity rows.
2008-09-08 17:45:36 +00:00
Al Riddoch
aea018b198
2008-09-04 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Expand the query for bootstrapping the world
database entry, so it more completely populates the row.
2008-09-04 14:30:01 +00:00
Al Riddoch
a2d9074fb8
2008-09-03 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp, common/Database.h: Add method to remove
entities from the database store. Remove the foreign key index
constraint from the LOC column.
2008-09-04 09:33:16 +00:00
Al Riddoch
6ded0c65f7
2008-09-03 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Bootstrap the world entry in the entity
database table at creation time.
2008-09-03 23:36:50 +00:00
Al Riddoch
15901bc72a
2008-09-03 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Fix the SQL syntax when updating properties.
2008-09-03 10:15:09 +00:00
Al Riddoch
adc72a7cec
2008-09-03 Al Riddoch <alriddoch@googlemail.com>
...
* common/Database.cpp: Remove debug output.
2008-09-03 00:11:15 +00:00