aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
authorMelanie2012-06-07 22:39:03 +0200
committerMelanie2012-06-07 22:39:03 +0200
commit26c5b329886e3bbf81e2c853ef2fc6d648ad5273 (patch)
treeb19ea7eef37fd74dfd79f5c17ab8513462add2b4 /OpenSim/Data/MySQL/MySQLSimulationData.cs
parentImplement playing of the real collision sounds, change scaling for avatar (diff)
downloadopensim-SC_OLD-26c5b329886e3bbf81e2c853ef2fc6d648ad5273.zip
opensim-SC_OLD-26c5b329886e3bbf81e2c853ef2fc6d648ad5273.tar.gz
opensim-SC_OLD-26c5b329886e3bbf81e2c853ef2fc6d648ad5273.tar.bz2
opensim-SC_OLD-26c5b329886e3bbf81e2c853ef2fc6d648ad5273.tar.xz
Add the ability to query the MYSQL databse for a list of the stored prim UUIDs
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index ec7a454..b978334 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -1911,6 +1911,37 @@ namespace OpenSim.Data.MySQL
1911 } 1911 }
1912 } 1912 }
1913 1913
1914 public UUID[] GetObjectIDs(UUID regionID)
1915 {
1916 List<UUID> uuids = new List<UUID>();
1917
1918 lock (m_dbLock)
1919 {
1920 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
1921 {
1922 dbcon.Open();
1923
1924 using (MySqlCommand cmd = dbcon.CreateCommand())
1925 {
1926 cmd.CommandText = "select UUID prom prims where RegionUUID = ?RegionUUID";
1927 cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
1928
1929 using (IDataReader reader = ExecuteReader(cmd))
1930 {
1931 while (reader.Read())
1932 {
1933 UUID id = new UUID(reader["UUID"].ToString());
1934
1935 uuids.Add(id);
1936 }
1937 }
1938 }
1939 }
1940 }
1941
1942 return uuids.ToArray();
1943 }
1944
1914 private void LoadSpawnPoints(RegionSettings rs) 1945 private void LoadSpawnPoints(RegionSettings rs)
1915 { 1946 {
1916 rs.ClearSpawnPoints(); 1947 rs.ClearSpawnPoints();