Add the ability to query the MYSQL databse for a list of the stored prim UUIDs

avinationmerge
Melanie 2012-06-07 22:39:03 +02:00
parent 4942314435
commit 26c5b32988
8 changed files with 63 additions and 0 deletions

View File

@ -2136,5 +2136,10 @@ VALUES
} }
} }
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return new UUID[0];
}
} }
} }

View File

@ -1911,6 +1911,37 @@ namespace OpenSim.Data.MySQL
} }
} }
public UUID[] GetObjectIDs(UUID regionID)
{
List<UUID> uuids = new List<UUID>();
lock (m_dbLock)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "select UUID prom prims where RegionUUID = ?RegionUUID";
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
using (IDataReader reader = ExecuteReader(cmd))
{
while (reader.Read())
{
UUID id = new UUID(reader["UUID"].ToString());
uuids.Add(id);
}
}
}
}
}
return uuids.ToArray();
}
private void LoadSpawnPoints(RegionSettings rs) private void LoadSpawnPoints(RegionSettings rs)
{ {
rs.ClearSpawnPoints(); rs.ClearSpawnPoints();

View File

@ -133,5 +133,10 @@ namespace OpenSim.Data.Null
public void Shutdown() public void Shutdown()
{ {
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return new UUID[0];
}
} }
} }

View File

@ -2791,5 +2791,9 @@ namespace OpenSim.Data.SQLite
} }
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return new UUID[0];
}
} }
} }

View File

@ -95,5 +95,7 @@ namespace OpenSim.Region.Framework.Interfaces
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
void StoreRegionWindlightSettings(RegionLightShareData wl); void StoreRegionWindlightSettings(RegionLightShareData wl);
void RemoveRegionWindlightSettings(UUID regionID); void RemoveRegionWindlightSettings(UUID regionID);
UUID[] GetObjectIDs(UUID regionID);
} }
} }

View File

@ -106,6 +106,7 @@ namespace OpenSim.Region.Framework.Interfaces
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
void StoreRegionWindlightSettings(RegionLightShareData wl); void StoreRegionWindlightSettings(RegionLightShareData wl);
void RemoveRegionWindlightSettings(UUID regionID); void RemoveRegionWindlightSettings(UUID regionID);
UUID[] GetObjectIDs(UUID regionID);
void Shutdown(); void Shutdown();
} }

View File

@ -148,5 +148,10 @@ namespace OpenSim.Services.Connectors
{ {
m_database.RemoveRegionWindlightSettings(regionID); m_database.RemoveRegionWindlightSettings(regionID);
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return m_database.GetObjectIDs(regionID);
}
} }
} }

View File

@ -112,6 +112,11 @@ namespace OpenSim.Data.Null
{ {
m_store.StoreRegionWindlightSettings(wl); m_store.StoreRegionWindlightSettings(wl);
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return new UUID[0];
}
} }
/// <summary> /// <summary>
@ -285,5 +290,10 @@ namespace OpenSim.Data.Null
public void Shutdown() public void Shutdown()
{ {
} }
public UUID[] GetObjectIDs(UUID regionID)
{
return new UUID[0];
}
} }
} }