From 6e8d94685d4e5784398ff656fdab169310dc219a Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 4 Jan 2010 02:52:43 +0000 Subject: AvatarStore. Untested, but complete --- OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 10 +++++----- OpenSim/Data/MySQL/Resources/001_Avatar.sql | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 OpenSim/Data/MySQL/Resources/001_Avatar.sql (limited to 'OpenSim/Data/MySQL') 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 } } - public T[] Get(string field, string key) + public virtual T[] Get(string field, string key) { return Get(new string[] { field }, new string[] { key }); } - public T[] Get(string[] fields, string[] keys) + public virtual T[] Get(string[] fields, string[] keys) { if (fields.Length != keys.Length) return new T[0]; @@ -184,7 +184,7 @@ namespace OpenSim.Data.MySQL return result.ToArray(); } - public T[] Get(string where) + public virtual T[] Get(string where) { MySqlCommand cmd = new MySqlCommand(); @@ -196,7 +196,7 @@ namespace OpenSim.Data.MySQL return DoQuery(cmd); } - public bool Store(T row) + public virtual bool Store(T row) { MySqlCommand cmd = new MySqlCommand(); @@ -234,7 +234,7 @@ namespace OpenSim.Data.MySQL return false; } - public bool Delete(string field, string val) + public virtual bool Delete(string field, string val) { MySqlCommand cmd = new MySqlCommand(); 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 @@ +BEGIN; + +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)); + +COMMIT; -- cgit v1.1