diff options
author | Melanie | 2012-06-07 22:39:03 +0200 |
---|---|---|
committer | Melanie | 2012-06-07 22:39:03 +0200 |
commit | 26c5b329886e3bbf81e2c853ef2fc6d648ad5273 (patch) | |
tree | b19ea7eef37fd74dfd79f5c17ab8513462add2b4 /OpenSim/Data | |
parent | Implement playing of the real collision sounds, change scaling for avatar (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 31 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullSimulationData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 4 |
4 files changed, 45 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index d9dfe86..df496a7 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -2136,5 +2136,10 @@ VALUES | |||
2136 | } | 2136 | } |
2137 | } | 2137 | } |
2138 | } | 2138 | } |
2139 | |||
2140 | public UUID[] GetObjectIDs(UUID regionID) | ||
2141 | { | ||
2142 | return new UUID[0]; | ||
2143 | } | ||
2139 | } | 2144 | } |
2140 | } | 2145 | } |
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(); |
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs index b788976..24b4511 100644 --- a/OpenSim/Data/Null/NullSimulationData.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs | |||
@@ -133,5 +133,10 @@ namespace OpenSim.Data.Null | |||
133 | public void Shutdown() | 133 | public void Shutdown() |
134 | { | 134 | { |
135 | } | 135 | } |
136 | |||
137 | public UUID[] GetObjectIDs(UUID regionID) | ||
138 | { | ||
139 | return new UUID[0]; | ||
140 | } | ||
136 | } | 141 | } |
137 | } | 142 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 7e7c08a..9ec285c 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -2791,5 +2791,9 @@ namespace OpenSim.Data.SQLite | |||
2791 | } | 2791 | } |
2792 | } | 2792 | } |
2793 | 2793 | ||
2794 | public UUID[] GetObjectIDs(UUID regionID) | ||
2795 | { | ||
2796 | return new UUID[0]; | ||
2797 | } | ||
2794 | } | 2798 | } |
2795 | } | 2799 | } |