Erik Ogenvik
038437bcaf
Escape ' characters for SQLite.
2018-10-30 19:50:09 +01:00
Erik Ogenvik
f87233cd53
Clean up code.
2018-10-30 19:35:57 +01:00
Erik Ogenvik
b0cf29b18d
Use SQLite 3 for persistence.
...
Instead of storing data in Postgres we store it by default in SQLite,
using an in-process database.
This makes setup and handling much easier.
2018-05-19 21:47:24 +02:00
Erik Ogenvik
4e788e90c7
Separate out Postgres specific parts.
2018-05-16 21:48:18 +02:00
Erik Ogenvik
66baf9c9dc
Stor all rules as files only.
...
We should only store entities and accounts in the database.
2018-05-16 11:22:09 +02:00
Erik Ogenvik
e7fa53214b
Use nullptr instead of NULL.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
62227f5664
Update with Atlas changes.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
5e8d20a020
Use correct types.
2017-05-27 20:27:48 +02:00
Erik Ogenvik
7aaa9b9ba7
Optimize includes.
2017-03-19 21:36:52 +01:00
Erik Ogenvik
37bcfbd4db
Handle Atlas API changes.
2016-03-18 20:07:23 +01:00
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