From ca724636d4615c6c58d3830fa8ccd620250886ea Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 26 Jun 2008 12:38:03 +0000
Subject: Apply patch from bug #1601 -- more documentation for Data/MySQL.
Thanks kerunix_Flan!
---
OpenSim/Data/MySQL/MySQLInventoryData.cs | 57 ++++++++++++++++++++++----------
1 file changed, 40 insertions(+), 17 deletions(-)
(limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 2d93df3..911958c 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -49,12 +49,16 @@ namespace OpenSim.Data.MySQL
private MySQLManager database;
///
- /// Initialises User interface
- /// Loads and initialises the MySQL storage plugin
- /// warns and uses the obsolete mysql_connection.ini if connect string is empty.
- /// Check for migration
+ /// Initialises Inventory interface
+ ///
+ ///
+ /// - Loads and initialises the MySQL storage plugin
+ /// - warns and uses the obsolete mysql_connection.ini if connect string is empty.
+ /// - Check for migration
+ ///
+ ///
///
- /// connect string.
+ /// connect string
public void Initialise(string connect)
{
if (connect != String.Empty)
@@ -90,6 +94,13 @@ namespace OpenSim.Data.MySQL
#region Test and initialization code
+ ///
+ ///
+ /// - Execute CreateFoldersTable.sql if oldVersion == null
+ /// - do nothing if oldVersion != null
+ ///
+ ///
+ ///
private void UpgradeFoldersTable(string oldVersion)
{
// null as the version, indicates that the table didn't exist
@@ -99,13 +110,19 @@ namespace OpenSim.Data.MySQL
return;
}
- // if the table is already at the current version, then we can exit immediately
-// if (oldVersion == "Rev. 2")
-// return;
-
-// database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
+ //// if the table is already at the current version, then we can exit immediately
+ // if (oldVersion == "Rev. 2")
+ // return;
+ // database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
}
+ ///
+ ///
+ /// - Execute CreateItemsTable.sql if oldVersion == null
+ /// - Execute "UpgradeItemsTableToVersion3.sql" if oldVersion start with "Rev. 2;"
+ ///
+ ///
+ ///
private void UpgradeItemsTable(string oldVersion)
{
// null as the version, indicates that the table didn't exist
@@ -123,6 +140,11 @@ namespace OpenSim.Data.MySQL
}
}
+ ///
+ ///
+ ///
+ /// MySQL connection handler
+ ///
private void TestTables(MySqlConnection conn, Migration m)
{
Dictionary tableList = new Dictionary();
@@ -178,7 +200,7 @@ namespace OpenSim.Data.MySQL
///
/// Returns the version of this DB provider
///
- /// A string containing the DB provider
+ /// A string containing the DB provider version
public string getVersion()
{
return database.getVersion();
@@ -260,9 +282,9 @@ namespace OpenSim.Data.MySQL
///
- /// see InventoryItemBase.getUserRootFolder
+ /// see
///
- ///
+ /// The user UUID
///
public InventoryFolderBase getUserRootFolder(LLUUID user)
{
@@ -545,9 +567,9 @@ namespace OpenSim.Data.MySQL
}
///
- ///
+ /// Detele the specified inventory item
///
- ///
+ /// The inventory item UUID to delete
public void deleteInventoryItem(LLUUID itemID)
{
try
@@ -609,9 +631,10 @@ namespace OpenSim.Data.MySQL
}
///
- /// Creates a new inventory folder
+ /// Move an inventory folder
///
- /// Folder to create
+ /// Folder to move
+ /// UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID
public void moveInventoryFolder(InventoryFolderBase folder)
{
string sql =
--
cgit v1.1