aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs2
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteBase.cs2
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteGridData.cs5
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs6
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs2
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs44
6 files changed, 31 insertions, 30 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index 3723343..462c433 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -313,4 +313,4 @@ namespace OpenSim.Framework.Data.SQLite
313 313
314 #endregion 314 #endregion
315 } 315 }
316} 316} \ No newline at end of file
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
index d9aaa97..2e8d341 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteBase.cs
@@ -263,4 +263,4 @@ namespace OpenSim.Framework.Data.SQLite
263 } 263 }
264 } 264 }
265 } 265 }
266} 266} \ No newline at end of file
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
index dddc085..4b790c3 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
@@ -130,16 +130,17 @@ namespace OpenSim.Framework.Data.SQLite
130 130
131 return row; 131 return row;
132 } 132 }
133
133 /// <summary> 134 /// <summary>
134 /// // Returns a list of avatar and UUIDs that match the query 135 /// // Returns a list of avatar and UUIDs that match the query
135 /// </summary> 136 /// </summary>
136
137 public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 137 public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
138 { 138 {
139 //Do nothing yet 139 //Do nothing yet
140 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); 140 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
141 return returnlist; 141 return returnlist;
142 } 142 }
143
143 /// <summary> 144 /// <summary>
144 /// Adds a new specified region to the database 145 /// Adds a new specified region to the database
145 /// </summary> 146 /// </summary>
@@ -201,4 +202,4 @@ namespace OpenSim.Framework.Data.SQLite
201 return null; 202 return null;
202 } 203 }
203 } 204 }
204} 205} \ No newline at end of file
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
index c696259..64a27f0 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
@@ -159,6 +159,7 @@ namespace OpenSim.Framework.Data.SQLite
159 159
160 invFoldersDa.Update(ds, "inventoryfolders"); 160 invFoldersDa.Update(ds, "inventoryfolders");
161 } 161 }
162
162 private void addItem(InventoryItemBase item) 163 private void addItem(InventoryItemBase item)
163 { 164 {
164 DataTable inventoryItemTable = ds.Tables["inventoryitems"]; 165 DataTable inventoryItemTable = ds.Tables["inventoryitems"];
@@ -248,7 +249,8 @@ namespace OpenSim.Framework.Data.SQLite
248 { 249 {
249 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 250 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
250 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; 251 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
251 string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + Util.ToRawUuidString(LLUUID.Zero) + "'"; 252 string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" +
253 Util.ToRawUuidString(LLUUID.Zero) + "'";
252 DataRow[] rows = inventoryFolderTable.Select(selectExp); 254 DataRow[] rows = inventoryFolderTable.Select(selectExp);
253 foreach (DataRow row in rows) 255 foreach (DataRow row in rows)
254 { 256 {
@@ -627,4 +629,4 @@ namespace OpenSim.Framework.Data.SQLite
627 return true; 629 return true;
628 } 630 }
629 } 631 }
630} 632} \ No newline at end of file
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index cac37d4..a97b146 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -275,4 +275,4 @@ namespace OpenSim.Framework.Data.SQLite
275 return returnval; 275 return returnval;
276 } 276 }
277 } 277 }
278} 278} \ No newline at end of file
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index 811e0fa..a719fa2 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using libsecondlife; 31using libsecondlife;
32using Mono.Data.SqliteClient; 32using Mono.Data.SqliteClient;
33using OpenSim.Framework;
34using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
35 34
36namespace OpenSim.Framework.Data.SQLite 35namespace OpenSim.Framework.Data.SQLite
@@ -38,7 +37,6 @@ namespace OpenSim.Framework.Data.SQLite
38 /// <summary> 37 /// <summary>
39 /// A User storage interface for the SQLite database system 38 /// A User storage interface for the SQLite database system
40 /// </summary> 39 /// </summary>
41
42 public class SQLiteUserData : SQLiteBase, IUserData 40 public class SQLiteUserData : SQLiteBase, IUserData
43 { 41 {
44 /// <summary> 42 /// <summary>
@@ -119,46 +117,46 @@ namespace OpenSim.Framework.Data.SQLite
119 } 117 }
120 } 118 }
121 119
122 public List<OpenSim.Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 120 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
123 { 121 {
124 List<OpenSim.Framework.AvatarPickerAvatar> returnlist = new List<OpenSim.Framework.AvatarPickerAvatar>(); 122 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
125 string[] querysplit; 123 string[] querysplit;
126 querysplit = query.Split(' '); 124 querysplit = query.Split(' ');
127 if (querysplit.Length == 2) 125 if (querysplit.Length == 2)
128 { 126 {
129 string select = "username like '" + querysplit[0] + "%' and surname like '" + querysplit[1] + "%'"; 127 string select = "username like '" + querysplit[0] + "%' and surname like '" + querysplit[1] + "%'";
130 lock(ds) 128 lock (ds)
131 { 129 {
132 DataRow[] rows = ds.Tables["users"].Select(select); 130 DataRow[] rows = ds.Tables["users"].Select(select);
133 if (rows.Length > 0) 131 if (rows.Length > 0)
134 { 132 {
135 for (int i = 0; i < rows.Length; i++) 133 for (int i = 0; i < rows.Length; i++)
136 { 134 {
137 OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); 135 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
138 DataRow row = rows[i]; 136 DataRow row = rows[i];
139 user.AvatarID = new LLUUID((string)row["UUID"]); 137 user.AvatarID = new LLUUID((string) row["UUID"]);
140 user.firstName = (string)row["username"]; 138 user.firstName = (string) row["username"];
141 user.lastName = (string)row["surname"]; 139 user.lastName = (string) row["surname"];
142 returnlist.Add(user); 140 returnlist.Add(user);
143 } 141 }
144 } 142 }
145 } 143 }
146 } 144 }
147 else if (querysplit.Length == 1) 145 else if (querysplit.Length == 1)
148 { 146 {
149
150 string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'"; 147 string select = "username like '" + querysplit[0] + "%' OR surname like '" + querysplit[0] + "%'";
151 lock(ds) 148 lock (ds)
152 { 149 {
153 DataRow[] rows = ds.Tables["users"].Select(select); 150 DataRow[] rows = ds.Tables["users"].Select(select);
154 if (rows.Length > 0) 151 if (rows.Length > 0)
155 { 152 {
156 for (int i = 0;i<rows.Length;i++) { 153 for (int i = 0; i < rows.Length; i++)
157 OpenSim.Framework.AvatarPickerAvatar user = new OpenSim.Framework.AvatarPickerAvatar(); 154 {
155 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
158 DataRow row = rows[i]; 156 DataRow row = rows[i];
159 user.AvatarID = new LLUUID((string)row[0]); 157 user.AvatarID = new LLUUID((string) row[0]);
160 user.firstName = (string)row[1]; 158 user.firstName = (string) row[1];
161 user.lastName = (string)row[2]; 159 user.lastName = (string) row[2];
162 returnlist.Add(user); 160 returnlist.Add(user);
163 } 161 }
164 } 162 }
@@ -166,6 +164,7 @@ namespace OpenSim.Framework.Data.SQLite
166 } 164 }
167 return returnlist; 165 return returnlist;
168 } 166 }
167
169 /// <summary> 168 /// <summary>
170 /// Returns a user by UUID direct 169 /// Returns a user by UUID direct
171 /// </summary> 170 /// </summary>
@@ -263,7 +262,6 @@ namespace OpenSim.Framework.Data.SQLite
263 } 262 }
264 else 263 else
265 { 264 {
266
267 row.Delete(); 265 row.Delete();
268 ua.AcceptChanges(); 266 ua.AcceptChanges();
269 } 267 }
@@ -595,4 +593,4 @@ namespace OpenSim.Framework.Data.SQLite
595 return true; 593 return true;
596 } 594 }
597 } 595 }
598} 596} \ No newline at end of file