diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/IAvatarData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 10 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/001_Avatar.sql | 5 |
3 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Data/IAvatarData.cs b/OpenSim/Data/IAvatarData.cs index 59213da..0a18e21 100644 --- a/OpenSim/Data/IAvatarData.cs +++ b/OpenSim/Data/IAvatarData.cs | |||
@@ -43,5 +43,7 @@ namespace OpenSim.Data | |||
43 | { | 43 | { |
44 | AvatarBaseData[] Get(string field, string val); | 44 | AvatarBaseData[] Get(string field, string val); |
45 | bool Store(AvatarBaseData data); | 45 | bool Store(AvatarBaseData data); |
46 | bool Delete(UUID principalID, string name); | ||
47 | bool Delete(string field, string val); | ||
46 | } | 48 | } |
47 | } | 49 | } |
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 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE 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 | |||
5 | COMMIT; | ||