diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index 547ea6b..ad28c00 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |||
@@ -100,6 +100,17 @@ namespace OpenSim.Data.SQLiteLegacy | |||
100 | 100 | ||
101 | return DoLoad(cmd, regionID, create); | 101 | return DoLoad(cmd, regionID, create); |
102 | } | 102 | } |
103 | |||
104 | public List<EstateSettings> LoadEstateSettingsAll() | ||
105 | { | ||
106 | List<EstateSettings> estateSettings = new List<EstateSettings>(); | ||
107 | |||
108 | List<int> estateIds = GetEstatesAll(); | ||
109 | foreach (int estateId in estateIds) | ||
110 | estateSettings.Add(LoadEstateSettings(estateId)); | ||
111 | |||
112 | return estateSettings; | ||
113 | } | ||
103 | 114 | ||
104 | private EstateSettings DoLoad(SqliteCommand cmd, UUID regionID, bool create) | 115 | private EstateSettings DoLoad(SqliteCommand cmd, UUID regionID, bool create) |
105 | { | 116 | { |
@@ -369,6 +380,28 @@ namespace OpenSim.Data.SQLiteLegacy | |||
369 | return result; | 380 | return result; |
370 | } | 381 | } |
371 | 382 | ||
383 | |||
384 | public List<int> GetEstatesAll() | ||
385 | { | ||
386 | List<int> result = new List<int>(); | ||
387 | |||
388 | string sql = "select EstateID from estate_settings"; | ||
389 | |||
390 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | ||
391 | |||
392 | cmd.CommandText = sql; | ||
393 | |||
394 | IDataReader r = cmd.ExecuteReader(); | ||
395 | |||
396 | while (r.Read()) | ||
397 | { | ||
398 | result.Add(Convert.ToInt32(r["EstateID"])); | ||
399 | } | ||
400 | r.Close(); | ||
401 | |||
402 | return result; | ||
403 | } | ||
404 | |||
372 | public bool LinkRegion(UUID regionID, int estateID) | 405 | public bool LinkRegion(UUID regionID, int estateID) |
373 | { | 406 | { |
374 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | 407 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); |