diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | 189 |
1 files changed, 96 insertions, 93 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 82a8434..5e95878 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -28,22 +28,14 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using System.Data; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | |||
34 | using OpenSim.Framework.Console; | ||
35 | using OpenSim.Framework; | ||
36 | using OpenSim.Framework; | ||
37 | using libsecondlife; | 33 | using libsecondlife; |
38 | |||
39 | using System.Data; | ||
40 | using System.Data.SqlTypes; | ||
41 | |||
42 | using Mono.Data.SqliteClient; | 34 | using Mono.Data.SqliteClient; |
35 | using OpenSim.Framework.Console; | ||
43 | 36 | ||
44 | namespace OpenSim.Framework.Data.SQLite | 37 | namespace OpenSim.Framework.Data.SQLite |
45 | { | 38 | { |
46 | |||
47 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData | 39 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData |
48 | { | 40 | { |
49 | private const string invItemsSelect = "select * from inventoryitems"; | 41 | private const string invItemsSelect = "select * from inventoryitems"; |
@@ -96,14 +88,14 @@ namespace OpenSim.Framework.Data.SQLite | |||
96 | public InventoryItemBase buildItem(DataRow row) | 88 | public InventoryItemBase buildItem(DataRow row) |
97 | { | 89 | { |
98 | InventoryItemBase item = new InventoryItemBase(); | 90 | InventoryItemBase item = new InventoryItemBase(); |
99 | item.inventoryID = new LLUUID((string)row["UUID"]); | 91 | item.inventoryID = new LLUUID((string) row["UUID"]); |
100 | item.assetID = new LLUUID((string)row["assetID"]); | 92 | item.assetID = new LLUUID((string) row["assetID"]); |
101 | item.assetType = Convert.ToInt32(row["assetType"]); | 93 | item.assetType = Convert.ToInt32(row["assetType"]); |
102 | item.invType = Convert.ToInt32(row["invType"]); | 94 | item.invType = Convert.ToInt32(row["invType"]); |
103 | item.parentFolderID = new LLUUID((string)row["parentFolderID"]); | 95 | item.parentFolderID = new LLUUID((string) row["parentFolderID"]); |
104 | item.avatarID = new LLUUID((string)row["avatarID"]); | 96 | item.avatarID = new LLUUID((string) row["avatarID"]); |
105 | item.creatorsID = new LLUUID((string)row["creatorsID"]); | 97 | item.creatorsID = new LLUUID((string) row["creatorsID"]); |
106 | item.inventoryName =(string) row["inventoryName"]; | 98 | item.inventoryName = (string) row["inventoryName"]; |
107 | item.inventoryDescription = (string) row["inventoryDescription"]; | 99 | item.inventoryDescription = (string) row["inventoryDescription"]; |
108 | 100 | ||
109 | item.inventoryNextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]); | 101 | item.inventoryNextPermissions = Convert.ToUInt32(row["inventoryNextPermissions"]); |
@@ -147,7 +139,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
147 | fillFolderRow(inventoryRow, folder); | 139 | fillFolderRow(inventoryRow, folder); |
148 | } | 140 | } |
149 | 141 | ||
150 | this.invFoldersDa.Update(ds, "inventoryfolders"); | 142 | invFoldersDa.Update(ds, "inventoryfolders"); |
151 | } | 143 | } |
152 | 144 | ||
153 | private void addItem(InventoryItemBase item) | 145 | private void addItem(InventoryItemBase item) |
@@ -165,7 +157,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
165 | { | 157 | { |
166 | fillItemRow(inventoryRow, item); | 158 | fillItemRow(inventoryRow, item); |
167 | } | 159 | } |
168 | this.invItemsDa.Update(ds, "inventoryitems"); | 160 | invItemsDa.Update(ds, "inventoryitems"); |
169 | } | 161 | } |
170 | 162 | ||
171 | public void Shutdown() | 163 | public void Shutdown() |
@@ -195,12 +187,14 @@ namespace OpenSim.Framework.Data.SQLite | |||
195 | /// <returns>A string containing the plugin version</returns> | 187 | /// <returns>A string containing the plugin version</returns> |
196 | public string getVersion() | 188 | public string getVersion() |
197 | { | 189 | { |
198 | System.Reflection.Module module = this.GetType().Module; | 190 | Module module = GetType().Module; |
199 | string dllName = module.Assembly.ManifestModule.Name; | 191 | string dllName = module.Assembly.ManifestModule.Name; |
200 | Version dllVersion = module.Assembly.GetName().Version; | 192 | Version dllVersion = module.Assembly.GetName().Version; |
201 | 193 | ||
202 | 194 | ||
203 | return string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision); | 195 | return |
196 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | ||
197 | dllVersion.Revision); | ||
204 | } | 198 | } |
205 | 199 | ||
206 | /// <summary> | 200 | /// <summary> |
@@ -306,7 +300,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
306 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 300 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
307 | getInventoryFolders(ref folders, parentID); | 301 | getInventoryFolders(ref folders, parentID); |
308 | 302 | ||
309 | for(int i=0; i<folders.Count; i++) | 303 | for (int i = 0; i < folders.Count; i++) |
310 | getInventoryFolders(ref folders, folders[i].folderID); | 304 | getInventoryFolders(ref folders, folders[i].folderID); |
311 | 305 | ||
312 | return folders; | 306 | return folders; |
@@ -320,9 +314,12 @@ namespace OpenSim.Framework.Data.SQLite | |||
320 | public InventoryItemBase getInventoryItem(LLUUID item) | 314 | public InventoryItemBase getInventoryItem(LLUUID item) |
321 | { | 315 | { |
322 | DataRow row = ds.Tables["inventoryitems"].Rows.Find(item); | 316 | DataRow row = ds.Tables["inventoryitems"].Rows.Find(item); |
323 | if (row != null) { | 317 | if (row != null) |
318 | { | ||
324 | return buildItem(row); | 319 | return buildItem(row); |
325 | } else { | 320 | } |
321 | else | ||
322 | { | ||
326 | return null; | 323 | return null; |
327 | } | 324 | } |
328 | } | 325 | } |
@@ -334,19 +331,21 @@ namespace OpenSim.Framework.Data.SQLite | |||
334 | /// <returns>A class containing folder information</returns> | 331 | /// <returns>A class containing folder information</returns> |
335 | public InventoryFolderBase getInventoryFolder(LLUUID folder) | 332 | public InventoryFolderBase getInventoryFolder(LLUUID folder) |
336 | { | 333 | { |
337 | 334 | // TODO: Deep voodoo here. If you enable this code then | |
338 | // TODO: Deep voodoo here. If you enable this code then | 335 | // multi region breaks. No idea why, but I figured it was |
339 | // multi region breaks. No idea why, but I figured it was | 336 | // better to leave multi region at this point. It does mean |
340 | // better to leave multi region at this point. It does mean | 337 | // that you don't get to see system textures why creating |
341 | // that you don't get to see system textures why creating | 338 | // clothes and the like. :( |
342 | // clothes and the like. :( | 339 | |
343 | 340 | DataRow row = ds.Tables["inventoryfolders"].Rows.Find(folder); | |
344 | DataRow row = ds.Tables["inventoryfolders"].Rows.Find(folder); | 341 | if (row != null) |
345 | if (row != null) { | 342 | { |
346 | return buildFolder(row); | 343 | return buildFolder(row); |
347 | } else { | 344 | } |
345 | else | ||
346 | { | ||
348 | return null; | 347 | return null; |
349 | } | 348 | } |
350 | } | 349 | } |
351 | 350 | ||
352 | /// <summary> | 351 | /// <summary> |
@@ -355,7 +354,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
355 | /// <param name="item">The item to be created</param> | 354 | /// <param name="item">The item to be created</param> |
356 | public void addInventoryItem(InventoryItemBase item) | 355 | public void addInventoryItem(InventoryItemBase item) |
357 | { | 356 | { |
358 | this.addItem(item); | 357 | addItem(item); |
359 | } | 358 | } |
360 | 359 | ||
361 | /// <summary> | 360 | /// <summary> |
@@ -364,7 +363,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
364 | /// <param name="item">The updated item</param> | 363 | /// <param name="item">The updated item</param> |
365 | public void updateInventoryItem(InventoryItemBase item) | 364 | public void updateInventoryItem(InventoryItemBase item) |
366 | { | 365 | { |
367 | this.addItem(item); | 366 | addItem(item); |
368 | } | 367 | } |
369 | 368 | ||
370 | /// <summary> | 369 | /// <summary> |
@@ -376,12 +375,12 @@ namespace OpenSim.Framework.Data.SQLite | |||
376 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; | 375 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; |
377 | 376 | ||
378 | DataRow inventoryRow = inventoryItemTable.Rows.Find(itemID); | 377 | DataRow inventoryRow = inventoryItemTable.Rows.Find(itemID); |
379 | if (inventoryRow != null) | 378 | if (inventoryRow != null) |
380 | { | 379 | { |
381 | inventoryRow.Delete(); | 380 | inventoryRow.Delete(); |
382 | } | 381 | } |
383 | 382 | ||
384 | this.invItemsDa.Update(ds, "inventoryitems"); | 383 | invItemsDa.Update(ds, "inventoryitems"); |
385 | } | 384 | } |
386 | 385 | ||
387 | 386 | ||
@@ -394,7 +393,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
394 | { | 393 | { |
395 | List<InventoryItemBase> items = getInventoryInFolder(folderId); | 394 | List<InventoryItemBase> items = getInventoryInFolder(folderId); |
396 | 395 | ||
397 | foreach(InventoryItemBase i in items) | 396 | foreach (InventoryItemBase i in items) |
398 | deleteInventoryItem(i.inventoryID); | 397 | deleteInventoryItem(i.inventoryID); |
399 | } | 398 | } |
400 | 399 | ||
@@ -404,7 +403,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
404 | /// <param name="folder">The inventory folder</param> | 403 | /// <param name="folder">The inventory folder</param> |
405 | public void addInventoryFolder(InventoryFolderBase folder) | 404 | public void addInventoryFolder(InventoryFolderBase folder) |
406 | { | 405 | { |
407 | this.addFolder(folder); | 406 | addFolder(folder); |
408 | } | 407 | } |
409 | 408 | ||
410 | /// <summary> | 409 | /// <summary> |
@@ -413,7 +412,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
413 | /// <param name="folder">The inventory folder</param> | 412 | /// <param name="folder">The inventory folder</param> |
414 | public void updateInventoryFolder(InventoryFolderBase folder) | 413 | public void updateInventoryFolder(InventoryFolderBase folder) |
415 | { | 414 | { |
416 | this.addFolder(folder); | 415 | addFolder(folder); |
417 | } | 416 | } |
418 | 417 | ||
419 | 418 | ||
@@ -427,7 +426,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
427 | public void deleteInventoryFolder(LLUUID folderID) | 426 | public void deleteInventoryFolder(LLUUID folderID) |
428 | { | 427 | { |
429 | List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID); | 428 | List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID); |
430 | 429 | ||
431 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; | 430 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; |
432 | DataRow inventoryRow; | 431 | DataRow inventoryRow; |
433 | 432 | ||
@@ -450,7 +449,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
450 | inventoryRow.Delete(); | 449 | inventoryRow.Delete(); |
451 | } | 450 | } |
452 | 451 | ||
453 | this.invFoldersDa.Update(ds, "inventoryfolders"); | 452 | invFoldersDa.Update(ds, "inventoryfolders"); |
454 | } | 453 | } |
455 | 454 | ||
456 | /*********************************************************************** | 455 | /*********************************************************************** |
@@ -458,43 +457,43 @@ namespace OpenSim.Framework.Data.SQLite | |||
458 | * Data Table definitions | 457 | * Data Table definitions |
459 | * | 458 | * |
460 | **********************************************************************/ | 459 | **********************************************************************/ |
461 | 460 | ||
462 | private static DataTable createInventoryItemsTable() | 461 | private static DataTable createInventoryItemsTable() |
463 | { | 462 | { |
464 | DataTable inv = new DataTable("inventoryitems"); | 463 | DataTable inv = new DataTable("inventoryitems"); |
465 | 464 | ||
466 | createCol(inv, "UUID", typeof(System.String)); //inventoryID | 465 | createCol(inv, "UUID", typeof (String)); //inventoryID |
467 | createCol(inv, "assetID", typeof(System.String)); | 466 | createCol(inv, "assetID", typeof (String)); |
468 | createCol(inv, "assetType", typeof(System.Int32)); | 467 | createCol(inv, "assetType", typeof (Int32)); |
469 | createCol(inv, "invType", typeof(System.Int32)); | 468 | createCol(inv, "invType", typeof (Int32)); |
470 | createCol(inv, "parentFolderID", typeof(System.String)); | 469 | createCol(inv, "parentFolderID", typeof (String)); |
471 | createCol(inv, "avatarID", typeof(System.String)); | 470 | createCol(inv, "avatarID", typeof (String)); |
472 | createCol(inv, "creatorsID", typeof(System.String)); | 471 | createCol(inv, "creatorsID", typeof (String)); |
473 | 472 | ||
474 | createCol(inv, "inventoryName", typeof(System.String)); | 473 | createCol(inv, "inventoryName", typeof (String)); |
475 | createCol(inv, "inventoryDescription", typeof(System.String)); | 474 | createCol(inv, "inventoryDescription", typeof (String)); |
476 | // permissions | 475 | // permissions |
477 | createCol(inv, "inventoryNextPermissions", typeof(System.Int32)); | 476 | createCol(inv, "inventoryNextPermissions", typeof (Int32)); |
478 | createCol(inv, "inventoryCurrentPermissions", typeof(System.Int32)); | 477 | createCol(inv, "inventoryCurrentPermissions", typeof (Int32)); |
479 | createCol(inv, "inventoryBasePermissions", typeof(System.Int32)); | 478 | createCol(inv, "inventoryBasePermissions", typeof (Int32)); |
480 | createCol(inv, "inventoryEveryOnePermissions", typeof(System.Int32)); | 479 | createCol(inv, "inventoryEveryOnePermissions", typeof (Int32)); |
481 | 480 | ||
482 | inv.PrimaryKey = new DataColumn[] { inv.Columns["UUID"] }; | 481 | inv.PrimaryKey = new DataColumn[] {inv.Columns["UUID"]}; |
483 | return inv; | 482 | return inv; |
484 | } | 483 | } |
485 | 484 | ||
486 | private DataTable createInventoryFoldersTable() | 485 | private DataTable createInventoryFoldersTable() |
487 | { | 486 | { |
488 | DataTable fol = new DataTable("inventoryfolders"); | 487 | DataTable fol = new DataTable("inventoryfolders"); |
489 | 488 | ||
490 | createCol(fol, "UUID", typeof(System.String)); //folderID | 489 | createCol(fol, "UUID", typeof (String)); //folderID |
491 | createCol(fol, "name", typeof(System.String)); | 490 | createCol(fol, "name", typeof (String)); |
492 | createCol(fol, "agentID", typeof(System.String)); | 491 | createCol(fol, "agentID", typeof (String)); |
493 | createCol(fol, "parentID", typeof(System.String)); | 492 | createCol(fol, "parentID", typeof (String)); |
494 | createCol(fol, "type", typeof(System.Int32)); | 493 | createCol(fol, "type", typeof (Int32)); |
495 | createCol(fol, "version", typeof(System.Int32)); | 494 | createCol(fol, "version", typeof (Int32)); |
496 | 495 | ||
497 | fol.PrimaryKey = new DataColumn[] { fol.Columns["UUID"] }; | 496 | fol.PrimaryKey = new DataColumn[] {fol.Columns["UUID"]}; |
498 | return fol; | 497 | return fol; |
499 | } | 498 | } |
500 | 499 | ||
@@ -507,7 +506,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
507 | da.UpdateCommand.Connection = conn; | 506 | da.UpdateCommand.Connection = conn; |
508 | 507 | ||
509 | SqliteCommand delete = new SqliteCommand("delete from inventoryitems where UUID = :UUID"); | 508 | SqliteCommand delete = new SqliteCommand("delete from inventoryitems where UUID = :UUID"); |
510 | delete.Parameters.Add(createSqliteParameter("UUID", typeof(System.String))); | 509 | delete.Parameters.Add(createSqliteParameter("UUID", typeof (String))); |
511 | delete.Connection = conn; | 510 | delete.Connection = conn; |
512 | da.DeleteCommand = delete; | 511 | da.DeleteCommand = delete; |
513 | } | 512 | } |
@@ -521,7 +520,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
521 | da.UpdateCommand.Connection = conn; | 520 | da.UpdateCommand.Connection = conn; |
522 | 521 | ||
523 | SqliteCommand delete = new SqliteCommand("delete from inventoryfolders where UUID = :UUID"); | 522 | SqliteCommand delete = new SqliteCommand("delete from inventoryfolders where UUID = :UUID"); |
524 | delete.Parameters.Add(createSqliteParameter("UUID", typeof(System.String))); | 523 | delete.Parameters.Add(createSqliteParameter("UUID", typeof (String))); |
525 | delete.Connection = conn; | 524 | delete.Connection = conn; |
526 | da.DeleteCommand = delete; | 525 | da.DeleteCommand = delete; |
527 | } | 526 | } |
@@ -529,10 +528,10 @@ namespace OpenSim.Framework.Data.SQLite | |||
529 | private InventoryFolderBase buildFolder(DataRow row) | 528 | private InventoryFolderBase buildFolder(DataRow row) |
530 | { | 529 | { |
531 | InventoryFolderBase folder = new InventoryFolderBase(); | 530 | InventoryFolderBase folder = new InventoryFolderBase(); |
532 | folder.folderID = new LLUUID((string)row["UUID"]); | 531 | folder.folderID = new LLUUID((string) row["UUID"]); |
533 | folder.name = (string)row["name"]; | 532 | folder.name = (string) row["name"]; |
534 | folder.agentID = new LLUUID((string)row["agentID"]); | 533 | folder.agentID = new LLUUID((string) row["agentID"]); |
535 | folder.parentID = new LLUUID((string)row["parentID"]); | 534 | folder.parentID = new LLUUID((string) row["parentID"]); |
536 | folder.type = Convert.ToInt16(row["type"]); | 535 | folder.type = Convert.ToInt16(row["type"]); |
537 | folder.version = Convert.ToUInt16(row["version"]); | 536 | folder.version = Convert.ToUInt16(row["version"]); |
538 | return folder; | 537 | return folder; |
@@ -554,17 +553,18 @@ namespace OpenSim.Framework.Data.SQLite | |||
554 | * Test and Initialization code | 553 | * Test and Initialization code |
555 | * | 554 | * |
556 | **********************************************************************/ | 555 | **********************************************************************/ |
556 | |||
557 | private void InitDB(SqliteConnection conn) | 557 | private void InitDB(SqliteConnection conn) |
558 | { | 558 | { |
559 | string createInventoryItems = defineTable(createInventoryItemsTable()); | 559 | string createInventoryItems = defineTable(createInventoryItemsTable()); |
560 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); | 560 | string createInventoryFolders = defineTable(createInventoryFoldersTable()); |
561 | 561 | ||
562 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); | 562 | SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); |
563 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); | 563 | SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); |
564 | conn.Open(); | 564 | conn.Open(); |
565 | pcmd.ExecuteNonQuery(); | 565 | pcmd.ExecuteNonQuery(); |
566 | scmd.ExecuteNonQuery(); | 566 | scmd.ExecuteNonQuery(); |
567 | conn.Close(); | 567 | conn.Close(); |
568 | } | 568 | } |
569 | 569 | ||
570 | private bool TestTables(SqliteConnection conn) | 570 | private bool TestTables(SqliteConnection conn) |
@@ -575,10 +575,13 @@ namespace OpenSim.Framework.Data.SQLite | |||
575 | SqliteDataAdapter sDa = new SqliteDataAdapter(invFoldersSelectCmd); | 575 | SqliteDataAdapter sDa = new SqliteDataAdapter(invFoldersSelectCmd); |
576 | 576 | ||
577 | DataSet tmpDS = new DataSet(); | 577 | DataSet tmpDS = new DataSet(); |
578 | try { | 578 | try |
579 | { | ||
579 | pDa.Fill(tmpDS, "inventoryitems"); | 580 | pDa.Fill(tmpDS, "inventoryitems"); |
580 | sDa.Fill(tmpDS, "inventoryfolders"); | 581 | sDa.Fill(tmpDS, "inventoryfolders"); |
581 | } catch (Mono.Data.SqliteClient.SqliteSyntaxException) { | 582 | } |
583 | catch (SqliteSyntaxException) | ||
584 | { | ||
582 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 585 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); |
583 | InitDB(conn); | 586 | InitDB(conn); |
584 | } | 587 | } |
@@ -586,14 +589,18 @@ namespace OpenSim.Framework.Data.SQLite | |||
586 | pDa.Fill(tmpDS, "inventoryitems"); | 589 | pDa.Fill(tmpDS, "inventoryitems"); |
587 | sDa.Fill(tmpDS, "inventoryfolders"); | 590 | sDa.Fill(tmpDS, "inventoryfolders"); |
588 | 591 | ||
589 | foreach (DataColumn col in createInventoryItemsTable().Columns) { | 592 | foreach (DataColumn col in createInventoryItemsTable().Columns) |
590 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName) ) { | 593 | { |
594 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) | ||
595 | { | ||
591 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 596 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); |
592 | return false; | 597 | return false; |
593 | } | 598 | } |
594 | } | 599 | } |
595 | foreach (DataColumn col in createInventoryFoldersTable().Columns) { | 600 | foreach (DataColumn col in createInventoryFoldersTable().Columns) |
596 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName) ) { | 601 | { |
602 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) | ||
603 | { | ||
597 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 604 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); |
598 | return false; | 605 | return false; |
599 | } | 606 | } |
@@ -601,8 +608,4 @@ namespace OpenSim.Framework.Data.SQLite | |||
601 | return true; | 608 | return true; |
602 | } | 609 | } |
603 | } | 610 | } |
604 | } | 611 | } \ No newline at end of file |
605 | |||
606 | |||
607 | |||
608 | |||