29 using System.Collections;
30 using System.Collections.Generic;
33 using OpenSim.Framework;
35 using Community.CsharpSqlite.Sqlite;
37 using Mono.Data.Sqlite;
40 namespace OpenSim.Data.SQLite
45 : base(connectionString, realm,
"UserAccount")
51 string[] words = query.Split(
new char[] {
' '});
53 for (
int i = 0 ; i < words.Length ; i++)
55 if (words[i].Length < 3)
57 if (i != words.Length - 1)
58 Array.Copy(words, i + 1, words, i, words.Length - i - 1);
59 Array.Resize(ref words, words.Length - 1);
63 if (words.Length == 0)
69 using (SqliteCommand cmd =
new SqliteCommand())
71 if (words.Length == 1)
73 cmd.CommandText = String.Format(
"select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')",
74 m_Realm, scopeID.ToString(), words[0]);
78 cmd.CommandText = String.Format(
"select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{3}%')",
79 m_Realm, scopeID.ToString(), words[0], words[1]);
UserAccountData[] GetUsers(UUID scopeID, string query)
UserAccountData[] GetUsersWhere(UUID scopeID, string where)
An interface for connecting to the user accounts datastore
SQLiteUserAccountData(string connectionString, string realm)