aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie2010-01-04 02:52:43 +0000
committerMelanie2010-01-04 02:52:43 +0000
commit6e8d94685d4e5784398ff656fdab169310dc219a (patch)
tree41afa2c07f493c013a9535e4ea81a7866f5620f2 /OpenSim/Data/MySQL
parentSome work on avatar service. Retrieval and storage done (diff)
downloadopensim-SC_OLD-6e8d94685d4e5784398ff656fdab169310dc219a.zip
opensim-SC_OLD-6e8d94685d4e5784398ff656fdab169310dc219a.tar.gz
opensim-SC_OLD-6e8d94685d4e5784398ff656fdab169310dc219a.tar.bz2
opensim-SC_OLD-6e8d94685d4e5784398ff656fdab169310dc219a.tar.xz
AvatarStore. Untested, but complete
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs10
-rw-r--r--OpenSim/Data/MySQL/Resources/001_Avatar.sql5
2 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index 873d6d4..1a97fee 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -95,12 +95,12 @@ namespace OpenSim.Data.MySQL
95 } 95 }
96 } 96 }
97 97
98 public T[] Get(string field, string key) 98 public virtual T[] Get(string field, string key)
99 { 99 {
100 return Get(new string[] { field }, new string[] { key }); 100 return Get(new string[] { field }, new string[] { key });
101 } 101 }
102 102
103 public T[] Get(string[] fields, string[] keys) 103 public virtual T[] Get(string[] fields, string[] keys)
104 { 104 {
105 if (fields.Length != keys.Length) 105 if (fields.Length != keys.Length)
106 return new T[0]; 106 return new T[0];
@@ -184,7 +184,7 @@ namespace OpenSim.Data.MySQL
184 return result.ToArray(); 184 return result.ToArray();
185 } 185 }
186 186
187 public T[] Get(string where) 187 public virtual T[] Get(string where)
188 { 188 {
189 MySqlCommand cmd = new MySqlCommand(); 189 MySqlCommand cmd = new MySqlCommand();
190 190
@@ -196,7 +196,7 @@ namespace OpenSim.Data.MySQL
196 return DoQuery(cmd); 196 return DoQuery(cmd);
197 } 197 }
198 198
199 public bool Store(T row) 199 public virtual bool Store(T row)
200 { 200 {
201 MySqlCommand cmd = new MySqlCommand(); 201 MySqlCommand cmd = new MySqlCommand();
202 202
@@ -234,7 +234,7 @@ namespace OpenSim.Data.MySQL
234 return false; 234 return false;
235 } 235 }
236 236
237 public bool Delete(string field, string val) 237 public virtual bool Delete(string field, string val)
238 { 238 {
239 MySqlCommand cmd = new MySqlCommand(); 239 MySqlCommand cmd = new MySqlCommand();
240 240
diff --git a/OpenSim/Data/MySQL/Resources/001_Avatar.sql b/OpenSim/Data/MySQL/Resources/001_Avatar.sql
new file mode 100644
index 0000000..27a3072
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/001_Avatar.sql
@@ -0,0 +1,5 @@
1BEGIN;
2
3CREATE TABLE Avatars (PrincipalID CHAR(36) NOT NULL, Name VARCHAR(32) NOT NULL, Value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(PrincipalID, Name), KEY(PrincipalID));
4
5COMMIT;