diff options
author | Tleiades Hax | 2007-10-13 09:21:08 +0000 |
---|---|---|
committer | Tleiades Hax | 2007-10-13 09:21:08 +0000 |
commit | f6aeff6cc3f6ebc58db702206d469718d19b7ba0 (patch) | |
tree | 468fb8483a2cd03e472a6988ef60f1c8ff01c07e /OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |
parent | (no commit message) (diff) | |
download | opensim-SC-f6aeff6cc3f6ebc58db702206d469718d19b7ba0.zip opensim-SC-f6aeff6cc3f6ebc58db702206d469718d19b7ba0.tar.gz opensim-SC-f6aeff6cc3f6ebc58db702206d469718d19b7ba0.tar.bz2 opensim-SC-f6aeff6cc3f6ebc58db702206d469718d19b7ba0.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index 5a169ac..70e04b6 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |||
@@ -40,28 +40,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
40 | 40 | ||
41 | } | 41 | } |
42 | 42 | ||
43 | public AssetBase FetchAsset(LLUUID assetID) | 43 | public AssetBase FetchAsset(LLUUID uuid) |
44 | { | 44 | { |
45 | AssetBase asset = null; | 45 | throw new Exception("The method or operation is not implemented."); |
46 | |||
47 | MySqlCommand cmd = new MySqlCommand("SELECT name, description, assetType, invType, local, temporary, data FROM assets WHERE id=?id", _dbConnection.Connection); | ||
48 | MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); | ||
49 | p.Value = assetID.GetBytes(); | ||
50 | using (MySqlDataReader dbReader = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow)) | ||
51 | { | ||
52 | if (dbReader.Read()) | ||
53 | { | ||
54 | asset = new AssetBase(); | ||
55 | asset.Data = (byte[])dbReader["data"]; | ||
56 | asset.Description = (string)dbReader["description"]; | ||
57 | asset.FullID = assetID; | ||
58 | asset.InvType = (sbyte)dbReader["invType"]; | ||
59 | asset.Local = ((sbyte)dbReader["local"])!=0?true:false; | ||
60 | asset.Name = (string)dbReader["name"]; | ||
61 | asset.Type = (sbyte)dbReader["assetType"]; | ||
62 | } | ||
63 | } | ||
64 | return asset; | ||
65 | } | 46 | } |
66 | 47 | ||
67 | public void CreateAsset(AssetBase asset) | 48 | public void CreateAsset(AssetBase asset) |