From a0305888bcc7cd2e97f14c5e7893d151a5b9de7b Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 31 May 2007 14:05:19 +0000 Subject: * Yet more inventory shelling * Very initial MySQL work done * Refactored some of the MySQL code - functions which are passed a reader are no longer getX() but now readX(). --- .../OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs') diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs index 2eaa158..ef2e02e 100644 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs +++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs @@ -137,7 +137,7 @@ namespace OpenGrid.Framework.Data.MySQL } } - public SimProfileData getSimRow(IDataReader reader) + public SimProfileData readSimRow(IDataReader reader) { SimProfileData retval = new SimProfileData(); @@ -199,7 +199,7 @@ namespace OpenGrid.Framework.Data.MySQL return retval; } - public UserAgentData getAgentRow(IDataReader reader) + public UserAgentData readAgentRow(IDataReader reader) { UserAgentData retval = new UserAgentData(); @@ -231,7 +231,7 @@ namespace OpenGrid.Framework.Data.MySQL return retval; } - public UserProfileData getUserRow(IDataReader reader) + public UserProfileData readUserRow(IDataReader reader) { UserProfileData retval = new UserProfileData(); @@ -277,6 +277,32 @@ namespace OpenGrid.Framework.Data.MySQL return retval; } + public List readInventoryInFolder(IDataReader reader) + { + List rows = new List(); + + while(reader.Read()) + { + try + { + InventoryFolderBase retval = new InventoryFolderBase(); + + retval.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); + retval.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); + retval.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); + retval.name = (string)reader["folderName"]; + + rows.Add(retval); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + } + } + + return rows; + } + public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) { string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES "; -- cgit v1.1