diff options
author | Jeff Ames | 2008-05-16 01:22:11 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-16 01:22:11 +0000 |
commit | 65c5efe43b68700bad94076d4cd421160203c5de (patch) | |
tree | 589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Data/SQLite/SQLiteUserData.cs | |
parent | Thank you very much, mjm for : (diff) | |
download | opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2 opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteUserData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 8f78e0b..d8b140c 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite | |||
58 | 58 | ||
59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; | 59 | private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; |
60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; | 60 | private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; |
61 | 61 | ||
62 | private DataSet ds; | 62 | private DataSet ds; |
63 | private SqliteDataAdapter da; | 63 | private SqliteDataAdapter da; |
64 | private SqliteDataAdapter daf; | 64 | private SqliteDataAdapter daf; |
@@ -67,16 +67,16 @@ namespace OpenSim.Data.SQLite | |||
67 | override public void Initialise(string connect) | 67 | override public void Initialise(string connect) |
68 | { | 68 | { |
69 | // default to something sensible | 69 | // default to something sensible |
70 | if (connect == "") | 70 | if (connect == "") |
71 | connect = "URI=file:userprofiles.db,version=3"; | 71 | connect = "URI=file:userprofiles.db,version=3"; |
72 | 72 | ||
73 | SqliteConnection conn = new SqliteConnection(connect); | 73 | SqliteConnection conn = new SqliteConnection(connect); |
74 | TestTables(conn); | 74 | TestTables(conn); |
75 | 75 | ||
76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P | 76 | // This sucks, but It doesn't seem to work with the dataset Syncing :P |
77 | g_conn = conn; | 77 | g_conn = conn; |
78 | g_conn.Open(); | 78 | g_conn.Open(); |
79 | 79 | ||
80 | ds = new DataSet(); | 80 | ds = new DataSet(); |
81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); | 81 | da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn)); |
82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); | 82 | daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn)); |
@@ -159,7 +159,7 @@ namespace OpenSim.Data.SQLite | |||
159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 159 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
160 | { | 160 | { |
161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; | 161 | string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; |
162 | 162 | ||
163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) | 163 | using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) |
164 | { | 164 | { |
165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); | 165 | cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); |
@@ -228,11 +228,11 @@ namespace OpenSim.Data.SQLite | |||
228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); | 228 | m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString()); |
229 | } | 229 | } |
230 | } | 230 | } |
231 | 231 | ||
232 | return returnlist; | 232 | return returnlist; |
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | #endregion | 238 | #endregion |
@@ -380,9 +380,9 @@ namespace OpenSim.Data.SQLite | |||
380 | else | 380 | else |
381 | { | 381 | { |
382 | fillUserRow(row, user); | 382 | fillUserRow(row, user); |
383 | 383 | ||
384 | } | 384 | } |
385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the | 385 | // This is why we're getting the 'logins never log-off'.. because It isn't clearing the |
386 | // useragents table once the useragent is null | 386 | // useragents table once the useragent is null |
387 | // | 387 | // |
388 | // A database guy should look at this and figure out the best way to clear the useragents table. | 388 | // A database guy should look at this and figure out the best way to clear the useragents table. |
@@ -403,7 +403,7 @@ namespace OpenSim.Data.SQLite | |||
403 | } | 403 | } |
404 | else | 404 | else |
405 | { | 405 | { |
406 | // I just added this to help the standalone login situation. | 406 | // I just added this to help the standalone login situation. |
407 | //It still needs to be looked at by a Database guy | 407 | //It still needs to be looked at by a Database guy |
408 | DataTable ua = ds.Tables["useragents"]; | 408 | DataTable ua = ds.Tables["useragents"]; |
409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); | 409 | row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); |
@@ -480,7 +480,7 @@ namespace OpenSim.Data.SQLite | |||
480 | 480 | ||
481 | /// Appearance | 481 | /// Appearance |
482 | /// TODO: stubs for now to get us to a compiling state gently | 482 | /// TODO: stubs for now to get us to a compiling state gently |
483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) | 483 | // override public AvatarAppearance GetUserAppearance(LLUUID user) |
484 | // { | 484 | // { |
485 | // return new AvatarAppearance(); | 485 | // return new AvatarAppearance(); |
486 | // } | 486 | // } |
@@ -494,17 +494,17 @@ namespace OpenSim.Data.SQLite | |||
494 | { | 494 | { |
495 | return; | 495 | return; |
496 | } | 496 | } |
497 | 497 | ||
498 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 498 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
499 | { | 499 | { |
500 | return; | 500 | return; |
501 | } | 501 | } |
502 | 502 | ||
503 | override public List<LLUUID> GetAttachments(LLUUID user) | 503 | override public List<LLUUID> GetAttachments(LLUUID user) |
504 | { | 504 | { |
505 | return new List<LLUUID>(); | 505 | return new List<LLUUID>(); |
506 | } | 506 | } |
507 | 507 | ||
508 | /// <summary> | 508 | /// <summary> |
509 | /// Returns the name of the storage provider | 509 | /// Returns the name of the storage provider |
510 | /// </summary> | 510 | /// </summary> |
@@ -525,13 +525,13 @@ namespace OpenSim.Data.SQLite | |||
525 | 525 | ||
526 | /*********************************************************************** | 526 | /*********************************************************************** |
527 | * | 527 | * |
528 | * DataTable creation | 528 | * DataTable creation |
529 | * | 529 | * |
530 | **********************************************************************/ | 530 | **********************************************************************/ |
531 | /*********************************************************************** | 531 | /*********************************************************************** |
532 | * | 532 | * |
533 | * Database Definition Functions | 533 | * Database Definition Functions |
534 | * | 534 | * |
535 | * This should be db agnostic as we define them in ADO.NET terms | 535 | * This should be db agnostic as we define them in ADO.NET terms |
536 | * | 536 | * |
537 | **********************************************************************/ | 537 | **********************************************************************/ |
@@ -610,7 +610,7 @@ namespace OpenSim.Data.SQLite | |||
610 | } | 610 | } |
611 | 611 | ||
612 | /*********************************************************************** | 612 | /*********************************************************************** |
613 | * | 613 | * |
614 | * Convert between ADO.NET <=> OpenSim Objects | 614 | * Convert between ADO.NET <=> OpenSim Objects |
615 | * | 615 | * |
616 | * These should be database independant | 616 | * These should be database independant |