mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
AvatarStore. Untested, but complete
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
5
OpenSim/Data/MySQL/Resources/001_Avatar.sql
Normal file
5
OpenSim/Data/MySQL/Resources/001_Avatar.sql
Normal file
@@ -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;
|
||||
Reference in New Issue
Block a user