aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index 0703e54..afa73b1 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Data.SQLite
37 /// <summary> 37 /// <summary>
38 /// A User storage interface for the DB4o database system 38 /// A User storage interface for the DB4o database system
39 /// </summary> 39 /// </summary>
40 public class SQLiteAssetData : SQLiteBase, IAssetProvider 40 public class SQLiteAssetData : AssetDataBase
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43 43
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.Data.SQLite
63 return; 63 return;
64 } 64 }
65 65
66 public AssetBase FetchAsset(LLUUID uuid) 66 override public AssetBase FetchAsset(LLUUID uuid)
67 { 67 {
68 68
69 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 69 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Data.SQLite
86 } 86 }
87 } 87 }
88 88
89 public void CreateAsset(AssetBase asset) 89 override public void CreateAsset(AssetBase asset)
90 { 90 {
91 m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID)); 91 m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID));
92 if (ExistsAsset(asset.FullID)) 92 if (ExistsAsset(asset.FullID))
@@ -111,7 +111,7 @@ namespace OpenSim.Framework.Data.SQLite
111 } 111 }
112 } 112 }
113 113
114 public void UpdateAsset(AssetBase asset) 114 override public void UpdateAsset(AssetBase asset)
115 { 115 {
116 LogAssetLoad(asset); 116 LogAssetLoad(asset);
117 117
@@ -144,7 +144,7 @@ namespace OpenSim.Framework.Data.SQLite
144 asset.InvType, temporary, local, assetLength)); 144 asset.InvType, temporary, local, assetLength));
145 } 145 }
146 146
147 public bool ExistsAsset(LLUUID uuid) 147 override public bool ExistsAsset(LLUUID uuid)
148 { 148 {
149 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 149 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
150 { 150 {
@@ -175,7 +175,7 @@ namespace OpenSim.Framework.Data.SQLite
175 } 175 }
176 } 176 }
177 177
178 public void CommitAssets() // force a sync to the database 178 override public void CommitAssets() // force a sync to the database
179 { 179 {
180 m_log.Info("[SQLITE]: Attempting commit"); 180 m_log.Info("[SQLITE]: Attempting commit");
181 // lock (ds) 181 // lock (ds)
@@ -197,14 +197,14 @@ namespace OpenSim.Framework.Data.SQLite
197 { 197 {
198 DataTable assets = new DataTable("assets"); 198 DataTable assets = new DataTable("assets");
199 199
200 createCol(assets, "UUID", typeof (String)); 200 SQLiteUtil.createCol(assets, "UUID", typeof (String));
201 createCol(assets, "Name", typeof (String)); 201 SQLiteUtil.createCol(assets, "Name", typeof (String));
202 createCol(assets, "Description", typeof (String)); 202 SQLiteUtil.createCol(assets, "Description", typeof (String));
203 createCol(assets, "Type", typeof (Int32)); 203 SQLiteUtil.createCol(assets, "Type", typeof (Int32));
204 createCol(assets, "InvType", typeof (Int32)); 204 SQLiteUtil.createCol(assets, "InvType", typeof (Int32));
205 createCol(assets, "Local", typeof (Boolean)); 205 SQLiteUtil.createCol(assets, "Local", typeof (Boolean));
206 createCol(assets, "Temporary", typeof (Boolean)); 206 SQLiteUtil.createCol(assets, "Temporary", typeof (Boolean));
207 createCol(assets, "Data", typeof (Byte[])); 207 SQLiteUtil.createCol(assets, "Data", typeof (Byte[]));
208 // Add in contraints 208 // Add in contraints
209 assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]}; 209 assets.PrimaryKey = new DataColumn[] {assets.Columns["UUID"]};
210 return assets; 210 return assets;
@@ -248,7 +248,7 @@ namespace OpenSim.Framework.Data.SQLite
248 248
249 private void InitDB(SqliteConnection conn) 249 private void InitDB(SqliteConnection conn)
250 { 250 {
251 string createAssets = defineTable(createAssetsTable()); 251 string createAssets = SQLiteUtil.defineTable(createAssetsTable());
252 SqliteCommand pcmd = new SqliteCommand(createAssets, conn); 252 SqliteCommand pcmd = new SqliteCommand(createAssets, conn);
253 pcmd.ExecuteNonQuery(); 253 pcmd.ExecuteNonQuery();
254 } 254 }
@@ -272,7 +272,7 @@ namespace OpenSim.Framework.Data.SQLite
272 272
273 #region IPlugin interface 273 #region IPlugin interface
274 274
275 public string Version 275 override public string Version
276 { 276 {
277 get 277 get
278 { 278 {
@@ -286,12 +286,12 @@ namespace OpenSim.Framework.Data.SQLite
286 } 286 }
287 } 287 }
288 288
289 public void Initialise() 289 override public void Initialise()
290 { 290 {
291 Initialise("AssetStorage.db", ""); 291 Initialise("AssetStorage.db", "");
292 } 292 }
293 293
294 public string Name 294 override public string Name
295 { 295 {
296 get { return "SQLite Asset storage engine"; } 296 get { return "SQLite Asset storage engine"; }
297 } 297 }