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.
* 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.
* common/Database.cpp, common/Database.h: Modify the Entity database
functions to include a chunk of text for location data.
* server/StorageManager.cpp: Implement naive storage of location
data to the database.
* common/Property.h: Add helper functions to make it easy and clear
to manipulate flags.
* common/Database.cpp, common/Database.h: Expand the entity database
table to include LOC and update sequence number. Implement new
functions that insert test entity data into entity and property
tables.
* rulesets/LocatedEntity.h: Add an accessor providing direct access to
the properties dictionary for persistence.
* server/Persistance.cpp: Remove the bounding box chunk from the
entity table schema.
* server/StorageManager.cpp: Implement inserting and updating rows
into the Entity and Propertiy tables.
* common/Database.cpp, common/Database.h: Change the return type
of a method to fit the preferred convention. Add an experimental
API for new Entity persistence.
* common/terrain_utils.h, common/Makefile.am: Remove the persistence
code used to save terrain data.
* common/Database.cpp, common/Database.h: Remove the object
relational API for persisting entity data, and put the code
beyond use.
* common/Database.h, common/Database.cpp: Add a new decoder for atlas
objects, and use it when getting the full contents of a table
full of Atlas data.
* server/Persistance.cpp, server/Persistance.h: Modify the API
for getting the rules table to use atlas objects rather than
messages.
* server/EntityFactory.cpp: Re-enable loading rules from the
Database, now that the data is available from the peristence
API in the right format.
* common/Database.cpp, common/Database.h: Add a new API for
attempting to bootstrap an instance database from the master.
* server/Persistance.h, server/Persistance.cpp: Make some of the
functions in the persistence API non-static, so they work
more cleanly and consistently. Use the new return codes
specified in the config header. If an instance can't get a database
connection, use the master database to try and create one.
* server/server.cpp: Use the persistence code the way it is
intended to be used.
* common/Database.cpp, common/Database.h: Remove the flag specifying
that the database should be created at connection time, as we
basically can't do this. Make the default database name depend on
instance name currently in use.
* common/accountbase.cpp, tools/cydumprules.cpp, tools/cyloadrules.cpp:
Fix code for the change to the database API.
* tests/Databasetest.cpp: Add a unit test for the features of
Database that can be checked without an RDBMS to connect to.
* common/Database.h, common/Database.cpp: Provide a function to
cleanup the Database singleton, for easier testing.
* common/Database.cpp: Assert that the connection to the database
has been created before calling any functions in the database
client lib using that connection.
* common/Database.cpp, common/Database.h, common/id.h, common/id.cpp:
Make newId() functions return the integer value.
* common/newid.cpp: Break newId out into its own file, and make
it handle whether or not the database should issue IDs.
* server/Connection.cpp, server/Persistance.cpp,
server/WorldRouter.cpp, server/server.cpp: Simply generating IDs
by just using the newId() function, and use its return value.
* common/Database.cpp, common/Database.h: Fix queries on ID relation
tables. Add methods to result functions for decoding the contents
of fields more directly. Implement selecting from array tables.
* common/terrain_utils.cpp, common/terrain_utils.h: New functions
for handling terrain in array database tables.
* rulesets/World.cpp, rulesets/World.h: Add functionality to track
changes to the terrain for persistence purposes.
* server/EntityFactory.cpp, server/EntityFactory.h, server/server.cpp:
Modify the way world entity persistence is bootstrapped to be
more consistent.
* server/Persistor.cpp: Provide specialisations to handle world so
that terrain is persisted. Implement storing terrain at entity
creation.
* server/Restoration.cpp, server/Restoration.h: Remove obsolete
restoration code. Return a status more accuratly representing
when restoration fails because of error, or if there is nothing
to restore.
* server/Restorer.cpp, server/Restorer.h, server/Restorer_impl.h:
Convert to using methods for restoring data in the Database class.
Implement restoring terrain from the database.
* server/WorldRouter.cpp: Update FIXME so its clear its the same
as all the other orientation related FIXMEs.
* server/Connection.cpp: New FIXME for password based Logout which
won't work.
* common/Database.h: Add interface for an idea which may help with
terrain persistence.
* common/Database.cpp, common/Database.h: Add function to check
whether an Atlas table has a given key.
* tools/cyloadrules.cpp: Use hasKey() function to make sure we
don't get errors when inserting rules.
* client/CreatorClient.cpp, rulesets/BaseMind.cpp,
rulesets/MemEntity.cpp, rulesets/MemEntity.h,
rulesets/MemMap.cpp, rulesets/MemMap.h, rulesets/Py_Map.cpp:
Set time on memory entities when we update them.
* common/BaseWorld.h: Make object accessor const.
* common/Database.cpp, common/Database.h, common/accountbase.cpp,
server/Connection.cpp, server/Persistance.cpp,
server/WorldRouter.cpp: Rename function to get new ID from
database to more correctly reflect its role.
* rulesets/PythonMindScript.cpp: Use get rather than getAdd
to sort out to and from of ops send to mind scripts.
* common/Database.h, common/Database.cpp: Modify relation code
to allow partial support for foreign key constrains to maintain
referential integrity. Full support will work when (if) primary
keys are inherited.
* server/Persistance.h, server/Persistance.cpp: Use updated relation
code for the accounts to characters relation.
* common/Database.cpp, common/Database.h: Add capability to specify
extra columns in generic Atlas database tables. Query the results
columns more robustly. Add a ruleset name column to the rules
table.
* server/EntityFactory.cpp: Re-write rule loader to handle new
format rules. Tighten up strictness of rule data. It is no
longer possible to specify defaults for location in the rule.
* tools/cyconvertrules.cpp: Ensure that the playable flag is
copied across when converting rules.
* tools/cyloadrules.cpp: Adapt to load the new format rules,
including handling the ruleset name column.
* common/Database.h: Add a registry for all tables.
* common/Database.cpp: Add names of all database tables to the
registry. Clean up, fix and fully implement running maintainance
commands on all tables on request.
* server/CommPSQLSocket.h, server/CommPSQLSocket.cpp: Implement
timing variables for handling regular running of database
maintainance commands. Add code to schedule the commands to
idle method, alternating between VACUUM FULL and VACUUM ANALYZE.