I was looking at the Data Interfaces, such as IAssetDataPlugin, and there are separate Create and Update methods. With MySQL, it is implemented that if you call either the Create or Update method, it will do a replace-into call to the database.
I asked in IRC, what should happen if you call insert on an item that exists, or update on an item that doesn't exist, so that I can write that behavior into a test. Adam says that the code uses the update and inserts without fully paying attention if it should really be calling Update or if it should be calling Insert. This will lead to problems in some of the other data providers like nhibernate or mssql, where the insert and updates don't do the same thing. I propose that we change to just having one "Store" method that replaces both the insert and update method, which will insert or update. This is what we have in practice with MySQL, so this will just change the interface to match it. My biggest concern would be breaking external data providers. When I mentioned this idea to Adam, he also mentioned changing the naming of the Fetch methods to Get, so that everything will be consistent. I have an example of what this change would look like on this mantis entry: http://opensimulator.org/mantis/view.php?id=4015 Any feedback or thoughts on this idea is greatly appreciated. Zack _______________________________________________ Opensim-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-dev
