From 4880bd121e737e0a5c384fddf61bd220c77ef88a Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Wed, 13 Feb 2008 13:39:51 +0000
Subject: * Split out MSSQLManager Test/Init into each provider. * Made regions
table name configurable (MSSQL only) * Added a note in ini.example pointing
out that the sql resources have to change if you change table names * Removed
duplicate picker method from GridData interface [Provided by
openlifegrid.com]
---
OpenSim/Framework/Data.MySQL/MySQLGridData.cs | 86 +--------------------------
1 file changed, 1 insertion(+), 85 deletions(-)
(limited to 'OpenSim/Framework/Data.MySQL/MySQLGridData.cs')
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
index d62c286..3737e48 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -206,91 +206,7 @@ namespace OpenSim.Framework.Data.MySQL
return null;
}
}
-
- ///
- /// // Returns a list of avatar and UUIDs that match the query
- ///
- public List GeneratePickerResults(LLUUID queryID, string query)
- {
- List returnlist = new List();
-
- Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
-
- string[] querysplit;
- querysplit = query.Split(' ');
- if (querysplit.Length == 2)
- {
- Dictionary param = new Dictionary();
- param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], String.Empty) + "%";
- param["?second"] = objAlphaNumericPattern.Replace(querysplit[1], String.Empty) + "%";
- try
- {
- lock (database)
- {
- IDbCommand result =
- database.Query(
- "SELECT UUID,username,surname FROM users WHERE username like ?first AND lastname like ?second LIMIT 100",
- param);
- IDataReader reader = result.ExecuteReader();
-
-
- while (reader.Read())
- {
- AvatarPickerAvatar user = new AvatarPickerAvatar();
- user.AvatarID = new LLUUID((string) reader["UUID"]);
- user.firstName = (string) reader["username"];
- user.lastName = (string) reader["surname"];
- returnlist.Add(user);
- }
- reader.Close();
- result.Dispose();
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- m_log.Error(e.ToString());
- return returnlist;
- }
- }
- else if (querysplit.Length == 1)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?first"] = objAlphaNumericPattern.Replace(querysplit[0], System.String.Empty) + "%";
-
- IDbCommand result =
- database.Query(
- "SELECT UUID,username,surname FROM users WHERE username like ?first OR lastname like ?second",
- param);
- IDataReader reader = result.ExecuteReader();
-
-
- while (reader.Read())
- {
- AvatarPickerAvatar user = new AvatarPickerAvatar();
- user.AvatarID = new LLUUID((string) reader["UUID"]);
- user.firstName = (string) reader["username"];
- user.lastName = (string) reader["surname"];
- returnlist.Add(user);
- }
- reader.Close();
- result.Dispose();
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- m_log.Error(e.ToString());
- return returnlist;
- }
- }
- return returnlist;
- }
-
+
///
/// Returns a sim profile from it's UUID
///
--
cgit v1.1