aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteUserData.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-04-21 07:09:17 +0000
committerAdam Frisby2008-04-21 07:09:17 +0000
commitfef3b3689492dea63693c964bcdbec9f5137eb5e (patch)
tree7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Data/SQLite/SQLiteUserData.cs
parent* Terrain Module code has been reformatted to comply with guidelines. (diff)
downloadopensim-SC-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip
opensim-SC-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz
opensim-SC-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2
opensim-SC-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 089c9df..97797e0 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -28,10 +28,11 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection;
31using libsecondlife; 32using libsecondlife;
33using log4net;
32using Mono.Data.SqliteClient; 34using Mono.Data.SqliteClient;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Framework.Console;
35 36
36namespace OpenSim.Data.SQLite 37namespace OpenSim.Data.SQLite
37{ 38{
@@ -40,7 +41,7 @@ namespace OpenSim.Data.SQLite
40 /// </summary> 41 /// </summary>
41 public class SQLiteUserData : UserDataBase 42 public class SQLiteUserData : UserDataBase
42 { 43 {
43 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 45
45 /// <summary> 46 /// <summary>
46 /// The database manager 47 /// The database manager
@@ -238,9 +239,9 @@ namespace OpenSim.Data.SQLite
238 } 239 }
239 240
240 241
241 override public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 242 override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
242 { 243 {
243 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); 244 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
244 string[] querysplit; 245 string[] querysplit;
245 querysplit = query.Split(' '); 246 querysplit = query.Split(' ');
246 if (querysplit.Length == 2) 247 if (querysplit.Length == 2)
@@ -254,7 +255,7 @@ namespace OpenSim.Data.SQLite
254 { 255 {
255 while (reader.Read()) 256 while (reader.Read())
256 { 257 {
257 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); 258 AvatarPickerAvatar user = new AvatarPickerAvatar();
258 user.AvatarID = new LLUUID((string) reader["UUID"]); 259 user.AvatarID = new LLUUID((string) reader["UUID"]);
259 user.firstName = (string) reader["username"]; 260 user.firstName = (string) reader["username"];
260 user.lastName = (string) reader["surname"]; 261 user.lastName = (string) reader["surname"];
@@ -275,7 +276,7 @@ namespace OpenSim.Data.SQLite
275 { 276 {
276 while (reader.Read()) 277 while (reader.Read())
277 { 278 {
278 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); 279 AvatarPickerAvatar user = new AvatarPickerAvatar();
279 user.AvatarID = new LLUUID((string) reader["UUID"]); 280 user.AvatarID = new LLUUID((string) reader["UUID"]);
280 user.firstName = (string) reader["username"]; 281 user.firstName = (string) reader["username"];
281 user.lastName = (string) reader["surname"]; 282 user.lastName = (string) reader["surname"];
@@ -766,7 +767,7 @@ namespace OpenSim.Data.SQLite
766 767
767 pcmd.ExecuteNonQuery(); 768 pcmd.ExecuteNonQuery();
768 } 769 }
769 catch (System.Exception) 770 catch (Exception)
770 { 771 {
771 m_log.Info("[USERS]: users table already exists"); 772 m_log.Info("[USERS]: users table already exists");
772 } 773 }
@@ -775,7 +776,7 @@ namespace OpenSim.Data.SQLite
775 { 776 {
776 fcmd.ExecuteNonQuery(); 777 fcmd.ExecuteNonQuery();
777 } 778 }
778 catch (System.Exception) 779 catch (Exception)
779 { 780 {
780 m_log.Info("[USERS]: userfriends table already exists"); 781 m_log.Info("[USERS]: userfriends table already exists");
781 } 782 }