aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteEstateData.cs
diff options
context:
space:
mode:
authorJeff Ames2008-08-18 00:39:10 +0000
committerJeff Ames2008-08-18 00:39:10 +0000
commit6ef9d4da901a346c232458317cca6268da888e2e (patch)
treedd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Data/SQLite/SQLiteEstateData.cs
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.zip
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteEstateData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index dc5ba5e..ffe7644 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -55,12 +55,12 @@ namespace OpenSim.Data.SQLite
55 public void Initialise(string connectionString) 55 public void Initialise(string connectionString)
56 { 56 {
57 m_connectionString = connectionString; 57 m_connectionString = connectionString;
58 58
59 m_log.Info("[ESTATE DB]: Sqlite - connecting: "+m_connectionString); 59 m_log.Info("[ESTATE DB]: Sqlite - connecting: "+m_connectionString);
60 60
61 m_connection = new SqliteConnection(m_connectionString); 61 m_connection = new SqliteConnection(m_connectionString);
62 m_connection.Open(); 62 m_connection.Open();
63 63
64 Assembly assem = GetType().Assembly; 64 Assembly assem = GetType().Assembly;
65 Migration m = new Migration(m_connection, assem, "EstateStore"); 65 Migration m = new Migration(m_connection, assem, "EstateStore");
66 m.Update(); 66 m.Update();
@@ -77,7 +77,7 @@ namespace OpenSim.Data.SQLite
77 if (f.Name.Substring(0, 2) == "m_") 77 if (f.Name.Substring(0, 2) == "m_")
78 m_FieldMap[f.Name.Substring(2)] = f; 78 m_FieldMap[f.Name.Substring(2)] = f;
79 } 79 }
80 80
81 private string[] FieldList 81 private string[] FieldList
82 { 82 {
83 get { return new List<string>(m_FieldMap.Keys).ToArray(); } 83 get { return new List<string>(m_FieldMap.Keys).ToArray(); }
@@ -134,7 +134,7 @@ namespace OpenSim.Data.SQLite
134 names.Remove("EstateID"); 134 names.Remove("EstateID");
135 135
136 sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")"; 136 sql = "insert into estate_settings ("+String.Join(",", names.ToArray())+") values ( :"+String.Join(", :", names.ToArray())+")";
137 137
138 cmd.CommandText = sql; 138 cmd.CommandText = sql;
139 cmd.Parameters.Clear(); 139 cmd.Parameters.Clear();
140 140
@@ -272,16 +272,16 @@ namespace OpenSim.Data.SQLite
272 private void SaveBanList(EstateSettings es) 272 private void SaveBanList(EstateSettings es)
273 { 273 {
274 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 274 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
275 275
276 cmd.CommandText = "delete from estateban where EstateID = :EstateID"; 276 cmd.CommandText = "delete from estateban where EstateID = :EstateID";
277 cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); 277 cmd.Parameters.Add(":EstateID", es.EstateID.ToString());
278 278
279 cmd.ExecuteNonQuery(); 279 cmd.ExecuteNonQuery();
280 280
281 cmd.Parameters.Clear(); 281 cmd.Parameters.Clear();
282 282
283 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )"; 283 cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )";
284 284
285 foreach (EstateBan b in es.EstateBans) 285 foreach (EstateBan b in es.EstateBans)
286 { 286 {
287 cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); 287 cmd.Parameters.Add(":EstateID", es.EstateID.ToString());
@@ -295,16 +295,16 @@ namespace OpenSim.Data.SQLite
295 void SaveUUIDList(uint EstateID, string table, LLUUID[] data) 295 void SaveUUIDList(uint EstateID, string table, LLUUID[] data)
296 { 296 {
297 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 297 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
298 298
299 cmd.CommandText = "delete from "+table+" where EstateID = :EstateID"; 299 cmd.CommandText = "delete from "+table+" where EstateID = :EstateID";
300 cmd.Parameters.Add(":EstateID", EstateID.ToString()); 300 cmd.Parameters.Add(":EstateID", EstateID.ToString());
301 301
302 cmd.ExecuteNonQuery(); 302 cmd.ExecuteNonQuery();
303 303
304 cmd.Parameters.Clear(); 304 cmd.Parameters.Clear();
305 305
306 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; 306 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
307 307
308 foreach (LLUUID uuid in data) 308 foreach (LLUUID uuid in data)
309 { 309 {
310 cmd.Parameters.Add(":EstateID", EstateID.ToString()); 310 cmd.Parameters.Add(":EstateID", EstateID.ToString());
@@ -336,7 +336,7 @@ namespace OpenSim.Data.SQLite
336 uuids.Add(uuid); 336 uuids.Add(uuid);
337 } 337 }
338 r.Close(); 338 r.Close();
339 339
340 return uuids.ToArray(); 340 return uuids.ToArray();
341 } 341 }
342 } 342 }