diff options
hooked up sdague new sqlite asset database provider to the old asset system. So we can still use sqlite for assets while we wait for the rest of the new asset system to be wrote.
Needs more testing, so if it causes problems will have to swap back to db4o.
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index 9138673..b53076c 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |||
@@ -34,13 +34,14 @@ using System.Data.SqlTypes; | |||
34 | using Mono.Data.SqliteClient; | 34 | using Mono.Data.SqliteClient; |
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Types; | 36 | using OpenSim.Framework.Types; |
37 | using OpenSim.Framework.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Framework.Data.SQLite | 39 | namespace OpenSim.Framework.Data.SQLite |
39 | { | 40 | { |
40 | /// <summary> | 41 | /// <summary> |
41 | /// A User storage interface for the DB4o database system | 42 | /// A User storage interface for the DB4o database system |
42 | /// </summary> | 43 | /// </summary> |
43 | public class SQLiteAssetData : SQLiteBase | 44 | public class SQLiteAssetData : SQLiteBase, IAssetProvider |
44 | { | 45 | { |
45 | /// <summary> | 46 | /// <summary> |
46 | /// The database manager | 47 | /// The database manager |
@@ -64,7 +65,15 @@ namespace OpenSim.Framework.Data.SQLite | |||
64 | ds.Tables.Add(createAssetsTable()); | 65 | ds.Tables.Add(createAssetsTable()); |
65 | 66 | ||
66 | setupAssetCommands(da, conn); | 67 | setupAssetCommands(da, conn); |
67 | da.Fill(ds.Tables["assets"]); | 68 | try |
69 | { | ||
70 | da.Fill(ds.Tables["assets"]); | ||
71 | } | ||
72 | catch (Exception) | ||
73 | { | ||
74 | MainLog.Instance.Verbose("AssetStorage", "Caught fill error on asset table"); | ||
75 | } | ||
76 | |||
68 | 77 | ||
69 | return; | 78 | return; |
70 | } | 79 | } |
@@ -172,7 +181,14 @@ namespace OpenSim.Framework.Data.SQLite | |||
172 | { | 181 | { |
173 | row["UUID"] = asset.FullID; | 182 | row["UUID"] = asset.FullID; |
174 | row["Name"] = asset.Name; | 183 | row["Name"] = asset.Name; |
175 | row["Description"] = asset.Description; | 184 | if (asset.Description != null) |
185 | { | ||
186 | row["Description"] = asset.Description; | ||
187 | } | ||
188 | else | ||
189 | { | ||
190 | row["Description"] = " "; | ||
191 | } | ||
176 | row["Type"] = asset.Type; | 192 | row["Type"] = asset.Type; |
177 | row["InvType"] = asset.InvType; | 193 | row["InvType"] = asset.InvType; |
178 | row["Local"] = asset.Local; | 194 | row["Local"] = asset.Local; |