diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 636bf86..2783ba1 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -208,20 +208,6 @@ namespace OpenSim.Data.SQLite | |||
208 | } | 208 | } |
209 | 209 | ||
210 | /// <summary> | 210 | /// <summary> |
211 | /// Delete an asset from database | ||
212 | /// </summary> | ||
213 | /// <param name="uuid"></param> | ||
214 | public void DeleteAsset(UUID uuid) | ||
215 | { | ||
216 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
217 | { | ||
218 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); | ||
219 | |||
220 | cmd.ExecuteNonQuery(); | ||
221 | } | ||
222 | } | ||
223 | |||
224 | /// <summary> | ||
225 | /// | 211 | /// |
226 | /// </summary> | 212 | /// </summary> |
227 | /// <param name="row"></param> | 213 | /// <param name="row"></param> |
@@ -338,6 +324,26 @@ namespace OpenSim.Data.SQLite | |||
338 | get { return "SQLite Asset storage engine"; } | 324 | get { return "SQLite Asset storage engine"; } |
339 | } | 325 | } |
340 | 326 | ||
327 | public override bool Delete(string id) | ||
328 | { | ||
329 | UUID assetID; | ||
330 | |||
331 | if (!UUID.TryParse(id, out assetID)) | ||
332 | return false; | ||
333 | |||
334 | lock (this) | ||
335 | { | ||
336 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
337 | { | ||
338 | cmd.Parameters.Add(new SqliteParameter(":UUID", assetID.ToString())); | ||
339 | |||
340 | cmd.ExecuteNonQuery(); | ||
341 | } | ||
342 | } | ||
343 | |||
344 | return true; | ||
345 | } | ||
346 | |||
341 | #endregion | 347 | #endregion |
342 | } | 348 | } |
343 | } | 349 | } |