aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteEstateData.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-30 20:05:57 +0100
committerJustin Clark-Casey (justincc)2010-04-30 20:05:57 +0100
commit0b8b302aa0f2ee25be5cbdfefe232459e6e5b778 (patch)
tree8108a73ddf306c5f011e7bf91fb8ead5b6a678aa /OpenSim/Data/SQLite/SQLiteEstateData.cs
parenttake out some debug logging in the sqlite db adaptor (diff)
downloadopensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.zip
opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.gz
opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.bz2
opensim-SC-0b8b302aa0f2ee25be5cbdfefe232459e6e5b778.tar.xz
Fix a bunch of issues that crop up after the naive porting of the new sqlite db from master to 0.6.9
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteEstateData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs65
1 files changed, 2 insertions, 63 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index ad4e2a2..643e55d 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Data.SQLite
180 // 180 //
181 cmd.Parameters.Clear(); 181 cmd.Parameters.Clear();
182 cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = :UUID"; 182 cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = :UUID";
183 cmd.Parameters.Add(":UUID", regionID.ToString()); 183 cmd.Parameters.AddWithValue(":UUID", regionID.ToString());
184 184
185 try 185 try
186 { 186 {
@@ -336,66 +336,5 @@ namespace OpenSim.Data.SQLite
336 336
337 return uuids.ToArray(); 337 return uuids.ToArray();
338 } 338 }
339<<<<<<< HEAD:OpenSim/Data/SQLite/SQLiteEstateData.cs
340=======
341
342 public EstateSettings LoadEstateSettings(int estateID)
343 {
344 string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_settings where estate_settings.EstateID :EstateID";
345
346 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
347
348 cmd.CommandText = sql;
349 cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
350
351 return DoLoad(cmd, UUID.Zero, false);
352 }
353
354 public List<int> GetEstates(string search)
355 {
356 List<int> result = new List<int>();
357
358 string sql = "select EstateID from estate_settings where estate_settings.EstateName :EstateName";
359
360 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
361
362 cmd.CommandText = sql;
363 cmd.Parameters.AddWithValue(":EstateName", search);
364
365 IDataReader r = cmd.ExecuteReader();
366
367 while (r.Read())
368 {
369 result.Add(Convert.ToInt32(r["EstateID"]));
370 }
371 r.Close();
372
373 return result;
374 }
375
376 public bool LinkRegion(UUID regionID, int estateID)
377 {
378 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
379
380 cmd.CommandText = "insert into estate_map values (:RegionID, :EstateID)";
381 cmd.Parameters.AddWithValue(":RegionID", regionID.ToString());
382 cmd.Parameters.AddWithValue(":EstateID", estateID.ToString());
383
384 if (cmd.ExecuteNonQuery() == 0)
385 return false;
386
387 return true;
388 }
389
390 public List<UUID> GetRegions(int estateID)
391 {
392 return new List<UUID>();
393 }
394
395 public bool DeleteEstate(int estateID)
396 {
397 return false;
398 }
399>>>>>>> cc67de5... rename SQLiteNG to SQLite and SQLite to SQLiteLegacy:OpenSim/Data/SQLite/SQLiteEstateData.cs
400 } 339 }
401} 340} \ No newline at end of file