aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
authorHomer Horwitz2008-09-18 20:10:09 +0000
committerHomer Horwitz2008-09-18 20:10:09 +0000
commit1c08f46ec3397f4e4fd5897107c0df89bec70d84 (patch)
tree9c6896ead729fcf0f0a9357f4a232ce2ad1d6106 /OpenSim/Data/SQLite/SQLiteInventoryStore.cs
parent* Apply http://opensimulator.org/mantis/view.php?id=2212 (diff)
downloadopensim-SC_OLD-1c08f46ec3397f4e4fd5897107c0df89bec70d84.zip
opensim-SC_OLD-1c08f46ec3397f4e4fd5897107c0df89bec70d84.tar.gz
opensim-SC_OLD-1c08f46ec3397f4e4fd5897107c0df89bec70d84.tar.bz2
opensim-SC_OLD-1c08f46ec3397f4e4fd5897107c0df89bec70d84.tar.xz
- Add Dispose method to IRegionDataStore
- Add necessary dummy Dispose-methods where they are missing - Implement the SQLite Dispose-methods (currently only used for unit tests, in the next commit)
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs33
1 files changed, 25 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index ca7e612..49d351a 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -46,6 +46,7 @@ namespace OpenSim.Data.SQLite
46 private const string invItemsSelect = "select * from inventoryitems"; 46 private const string invItemsSelect = "select * from inventoryitems";
47 private const string invFoldersSelect = "select * from inventoryfolders"; 47 private const string invFoldersSelect = "select * from inventoryfolders";
48 48
49 private SqliteConnection conn;
49 private DataSet ds; 50 private DataSet ds;
50 private SqliteDataAdapter invItemsDa; 51 private SqliteDataAdapter invItemsDa;
51 private SqliteDataAdapter invFoldersDa; 52 private SqliteDataAdapter invFoldersDa;
@@ -71,7 +72,7 @@ namespace OpenSim.Data.SQLite
71 dbconnect = "URI=file:inventoryStore.db,version=3"; 72 dbconnect = "URI=file:inventoryStore.db,version=3";
72 } 73 }
73 m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect); 74 m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect);
74 SqliteConnection conn = new SqliteConnection(dbconnect); 75 conn = new SqliteConnection(dbconnect);
75 76
76 conn.Open(); 77 conn.Open();
77 78
@@ -102,6 +103,29 @@ namespace OpenSim.Data.SQLite
102 } 103 }
103 104
104 /// <summary> 105 /// <summary>
106 /// Closes the inventory interface
107 /// </summary>
108 public void Dispose()
109 {
110 if(conn != null) {
111 conn.Close();
112 conn = null;
113 }
114 if(invItemsDa != null) {
115 invItemsDa.Dispose();
116 invItemsDa = null;
117 }
118 if(invFoldersDa != null) {
119 invFoldersDa.Dispose();
120 invFoldersDa = null;
121 }
122 if(ds != null) {
123 ds.Dispose();
124 ds = null;
125 }
126 }
127
128 /// <summary>
105 /// 129 ///
106 /// </summary> 130 /// </summary>
107 /// <param name="row"></param> 131 /// <param name="row"></param>
@@ -278,13 +302,6 @@ namespace OpenSim.Data.SQLite
278 } 302 }
279 303
280 /// <summary> 304 /// <summary>
281 /// Closes the inventory interface
282 /// </summary>
283 public void Dispose()
284 {
285 }
286
287 /// <summary>
288 /// The name of this DB provider 305 /// The name of this DB provider
289 /// </summary> 306 /// </summary>
290 /// <returns>Name of DB provider</returns> 307 /// <returns>Name of DB provider</returns>