diff options
author | Melanie | 2010-05-09 18:03:57 +0100 |
---|---|---|
committer | Melanie | 2010-05-09 18:03:57 +0100 |
commit | 6a3e1734e67b4d6d4a9144e4f86658297eef11a6 (patch) | |
tree | 7132abbe44017ebe97034c1a4149fad743ce03a7 /OpenSim/Data/SQLite/SQLiteAssetData.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Add Delete handler to SQLite (NG) (diff) | |
download | opensim-SC-6a3e1734e67b4d6d4a9144e4f86658297eef11a6.zip opensim-SC-6a3e1734e67b4d6d4a9144e4f86658297eef11a6.tar.gz opensim-SC-6a3e1734e67b4d6d4a9144e4f86658297eef11a6.tar.bz2 opensim-SC-6a3e1734e67b4d6d4a9144e4f86658297eef11a6.tar.xz |
Merge branch 'master' into careminster-presence-refactor
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 | } |