add DeleteAsset
this also moves commit points around a bit for debuging, though this will change back now the MW has worked out synchronizationafrisby
parent
0770a5de0a
commit
207bf2e4cf
|
@ -121,12 +121,9 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
{
|
||||
fillAssetRow(row, asset);
|
||||
}
|
||||
if (ds.HasChanges()) {
|
||||
DataSet changed = ds.GetChanges();
|
||||
da.Update(changed, "assets");
|
||||
da.Update(ds, "assets");
|
||||
ds.AcceptChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExistsAsset(LLUUID uuid)
|
||||
{
|
||||
|
@ -134,14 +131,21 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
return (row != null);
|
||||
}
|
||||
|
||||
public void DeleteAsset(LLUUID uuid)
|
||||
{
|
||||
DataRow row = ds.Tables["assets"].Rows.Find(uuid);
|
||||
if (row != null) {
|
||||
row.Delete();
|
||||
}
|
||||
da.Update(ds, "assets");
|
||||
ds.AcceptChanges();
|
||||
}
|
||||
|
||||
public void CommitAssets() // force a sync to the database
|
||||
{
|
||||
MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
|
||||
if (ds.HasChanges()) {
|
||||
DataSet changed = ds.GetChanges();
|
||||
da.Update(changed, "assets");
|
||||
ds.AcceptChanges();
|
||||
}
|
||||
// da.Update(ds, "assets");
|
||||
// ds.AcceptChanges();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue