Added capbility to use MySQL as the database backend in stand alone mode for assets and inventory.

Added asset_plugin key to "StandAlone" section of OpenSim.ini
This commit is contained in:
Tleiades Hax
2007-10-13 09:21:08 +00:00
parent e8c1de8e72
commit f6aeff6cc3
4 changed files with 7 additions and 31 deletions

View File

@@ -40,28 +40,9 @@ namespace OpenSim.Framework.Data.MySQL
}
public AssetBase FetchAsset(LLUUID assetID)
public AssetBase FetchAsset(LLUUID uuid)
{
AssetBase asset = null;
MySqlCommand cmd = new MySqlCommand("SELECT name, description, assetType, invType, local, temporary, data FROM assets WHERE id=?id", _dbConnection.Connection);
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
p.Value = assetID.GetBytes();
using (MySqlDataReader dbReader = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow))
{
if (dbReader.Read())
{
asset = new AssetBase();
asset.Data = (byte[])dbReader["data"];
asset.Description = (string)dbReader["description"];
asset.FullID = assetID;
asset.InvType = (sbyte)dbReader["invType"];
asset.Local = ((sbyte)dbReader["local"])!=0?true:false;
asset.Name = (string)dbReader["name"];
asset.Type = (sbyte)dbReader["assetType"];
}
}
return asset;
throw new Exception("The method or operation is not implemented.");
}
public void CreateAsset(AssetBase asset)