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

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

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)
{
rs.ClearSpawnPoints();