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);
|
fillAssetRow(row, asset);
|
||||||
}
|
}
|
||||||
if (ds.HasChanges()) {
|
da.Update(ds, "assets");
|
||||||
DataSet changed = ds.GetChanges();
|
|
||||||
da.Update(changed, "assets");
|
|
||||||
ds.AcceptChanges();
|
ds.AcceptChanges();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public bool ExistsAsset(LLUUID uuid)
|
public bool ExistsAsset(LLUUID uuid)
|
||||||
{
|
{
|
||||||
|
@ -134,14 +131,21 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
return (row != null);
|
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
|
public void CommitAssets() // force a sync to the database
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
|
MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
|
||||||
if (ds.HasChanges()) {
|
// da.Update(ds, "assets");
|
||||||
DataSet changed = ds.GetChanges();
|
// ds.AcceptChanges();
|
||||||
da.Update(changed, "assets");
|
|
||||||
ds.AcceptChanges();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue