aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.MySQL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs48
1 files changed, 42 insertions, 6 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
index 11f34d7..0538bd3 100644
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -290,14 +290,50 @@ namespace OpenGrid.Framework.Data.MySQL
290 { 290 {
291 try 291 try
292 { 292 {
293 InventoryFolderBase retval = new InventoryFolderBase(); 293 InventoryFolderBase folder = new InventoryFolderBase();
294 294
295 retval.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); 295 folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
296 retval.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); 296 folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
297 retval.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); 297 folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
298 retval.name = (string)reader["folderName"]; 298 folder.name = (string)reader["folderName"];
299 299
300 rows.Add(retval); 300 rows.Add(folder);
301 }
302 catch (Exception e)
303 {
304 Console.WriteLine(e.ToString());
305 }
306 }
307
308 return rows;
309 }
310
311 /// <summary>
312 /// Reads a collection of items from an SQL result
313 /// </summary>
314 /// <param name="reader">The SQL Result</param>
315 /// <returns>A List containing Inventory Items</returns>
316 public List<InventoryItemBase> readInventoryItems(IDataReader reader)
317 {
318 List<InventoryItemBase> rows = new List<InventoryItemBase>();
319
320 while (reader.Read())
321 {
322 try
323 {
324 InventoryItemBase item = new InventoryItemBase();
325
326 item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]);
327 item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]);
328 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
329 item.inventoryDescription = (string)reader["inventoryDescription"];
330 item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]);
331 item.inventoryName = (string)reader["inventoryName"];
332 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
333 item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
334 item.type = Convert.ToInt32(reader["type"].ToString());
335
336 rows.Add(item);
301 } 337 }
302 catch (Exception e) 338 catch (Exception e)
303 { 339 {