aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-31 14:05:19 +0000
committerAdam Frisby2007-05-31 14:05:19 +0000
commita0305888bcc7cd2e97f14c5e7893d151a5b9de7b (patch)
tree54344bc967d58a368c0eda92dab9bb43b9d7cfb1 /OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
parentShelling out a Inventory framework a bit more. (diff)
downloadopensim-SC_OLD-a0305888bcc7cd2e97f14c5e7893d151a5b9de7b.zip
opensim-SC_OLD-a0305888bcc7cd2e97f14c5e7893d151a5b9de7b.tar.gz
opensim-SC_OLD-a0305888bcc7cd2e97f14c5e7893d151a5b9de7b.tar.bz2
opensim-SC_OLD-a0305888bcc7cd2e97f14c5e7893d151a5b9de7b.tar.xz
* 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().
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs32
1 files changed, 29 insertions, 3 deletions
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
137 } 137 }
138 } 138 }
139 139
140 public SimProfileData getSimRow(IDataReader reader) 140 public SimProfileData readSimRow(IDataReader reader)
141 { 141 {
142 SimProfileData retval = new SimProfileData(); 142 SimProfileData retval = new SimProfileData();
143 143
@@ -199,7 +199,7 @@ namespace OpenGrid.Framework.Data.MySQL
199 return retval; 199 return retval;
200 } 200 }
201 201
202 public UserAgentData getAgentRow(IDataReader reader) 202 public UserAgentData readAgentRow(IDataReader reader)
203 { 203 {
204 UserAgentData retval = new UserAgentData(); 204 UserAgentData retval = new UserAgentData();
205 205
@@ -231,7 +231,7 @@ namespace OpenGrid.Framework.Data.MySQL
231 return retval; 231 return retval;
232 } 232 }
233 233
234 public UserProfileData getUserRow(IDataReader reader) 234 public UserProfileData readUserRow(IDataReader reader)
235 { 235 {
236 UserProfileData retval = new UserProfileData(); 236 UserProfileData retval = new UserProfileData();
237 237
@@ -277,6 +277,32 @@ namespace OpenGrid.Framework.Data.MySQL
277 return retval; 277 return retval;
278 } 278 }
279 279
280 public List<InventoryFolderBase> readInventoryInFolder(IDataReader reader)
281 {
282 List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
283
284 while(reader.Read())
285 {
286 try
287 {
288 InventoryFolderBase retval = new InventoryFolderBase();
289
290 retval.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
291 retval.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
292 retval.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
293 retval.name = (string)reader["folderName"];
294
295 rows.Add(retval);
296 }
297 catch (Exception e)
298 {
299 Console.WriteLine(e.ToString());
300 }
301 }
302
303 return rows;
304 }
305
280 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) 306 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
281 { 307 {
282 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES "; 308 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";