diff options
author | lbsa71 | 2008-03-28 14:54:20 +0000 |
---|---|---|
committer | lbsa71 | 2008-03-28 14:54:20 +0000 |
commit | 8c901e93474af5fcd17a7f37acd711622c5286e0 (patch) | |
tree | 732b8db3dd2480d7cdeed49f4d086194e529ba6f /OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |
parent | Applied patch from mantis# 825, thanks A_Biondi (diff) | |
download | opensim-SC_OLD-8c901e93474af5fcd17a7f37acd711622c5286e0.zip opensim-SC_OLD-8c901e93474af5fcd17a7f37acd711622c5286e0.tar.gz opensim-SC_OLD-8c901e93474af5fcd17a7f37acd711622c5286e0.tar.bz2 opensim-SC_OLD-8c901e93474af5fcd17a7f37acd711622c5286e0.tar.xz |
* Introduced common abstract AssetDataBase implementing IAssetProvider
* changed the semantics of SQLiteBase to SQLiteUtils
* Added abstract placeholder files for the other db providers
Diffstat (limited to 'OpenSim/Framework/Data.MySQL/MySQLAssetData.cs')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index b439582..79994ae 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |||
@@ -34,7 +34,7 @@ using OpenSim.Framework.Console; | |||
34 | 34 | ||
35 | namespace OpenSim.Framework.Data.MySQL | 35 | namespace OpenSim.Framework.Data.MySQL |
36 | { | 36 | { |
37 | internal class MySQLAssetData : IAssetProvider | 37 | internal class MySQLAssetData : AssetDataBase, IPlugin |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
40 | 40 | ||
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
66 | UpgradeAssetsTable(tableList["assets"]); | 66 | UpgradeAssetsTable(tableList["assets"]); |
67 | } | 67 | } |
68 | 68 | ||
69 | public AssetBase FetchAsset(LLUUID assetID) | 69 | override public AssetBase FetchAsset(LLUUID assetID) |
70 | { | 70 | { |
71 | AssetBase asset = null; | 71 | AssetBase asset = null; |
72 | lock (_dbConnection) | 72 | lock (_dbConnection) |
@@ -108,7 +108,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
108 | return asset; | 108 | return asset; |
109 | } | 109 | } |
110 | 110 | ||
111 | public void CreateAsset(AssetBase asset) | 111 | override public void CreateAsset(AssetBase asset) |
112 | { | 112 | { |
113 | lock (_dbConnection) | 113 | lock (_dbConnection) |
114 | { | 114 | { |
@@ -147,12 +147,12 @@ namespace OpenSim.Framework.Data.MySQL | |||
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | public void UpdateAsset(AssetBase asset) | 150 | override public void UpdateAsset(AssetBase asset) |
151 | { | 151 | { |
152 | CreateAsset(asset); | 152 | CreateAsset(asset); |
153 | } | 153 | } |
154 | 154 | ||
155 | public bool ExistsAsset(LLUUID uuid) | 155 | override public bool ExistsAsset(LLUUID uuid) |
156 | { | 156 | { |
157 | throw new Exception("The method or operation is not implemented."); | 157 | throw new Exception("The method or operation is not implemented."); |
158 | } | 158 | } |
@@ -160,7 +160,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
160 | /// <summary> | 160 | /// <summary> |
161 | /// All writes are immediately commited to the database, so this is a no-op | 161 | /// All writes are immediately commited to the database, so this is a no-op |
162 | /// </summary> | 162 | /// </summary> |
163 | public void CommitAssets() | 163 | override public void CommitAssets() |
164 | { | 164 | { |
165 | } | 165 | } |
166 | 166 | ||
@@ -168,7 +168,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
168 | 168 | ||
169 | #region IPlugin Members | 169 | #region IPlugin Members |
170 | 170 | ||
171 | public void Initialise() | 171 | override public void Initialise() |
172 | { | 172 | { |
173 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | 173 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); |
174 | string hostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | 174 | string hostname = GridDataMySqlFile.ParseFileReadValue("hostname"); |
@@ -183,12 +183,12 @@ namespace OpenSim.Framework.Data.MySQL | |||
183 | TestTables(); | 183 | TestTables(); |
184 | } | 184 | } |
185 | 185 | ||
186 | public string Version | 186 | override public string Version |
187 | { | 187 | { |
188 | get { return _dbConnection.getVersion(); } | 188 | get { return _dbConnection.getVersion(); } |
189 | } | 189 | } |
190 | 190 | ||
191 | public string Name | 191 | override public string Name |
192 | { | 192 | { |
193 | get { return "MySQL Asset storage engine"; } | 193 | get { return "MySQL Asset storage engine"; } |
194 | } | 194 | } |