diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 30ba642..d28956f 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -125,8 +125,8 @@ namespace OpenSim.Data.SQLite | |||
125 | /// <param name="asset">Asset Base</param> | 125 | /// <param name="asset">Asset Base</param> |
126 | override public void CreateAsset(AssetBase asset) | 126 | override public void CreateAsset(AssetBase asset) |
127 | { | 127 | { |
128 | //m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.FullID)); | 128 | //m_log.Info("[ASSET DB]: Creating Asset " + Util.ToRawUuidString(asset.Metadata.FullID)); |
129 | if (ExistsAsset(asset.FullID)) | 129 | if (ExistsAsset(asset.Metadata.FullID)) |
130 | { | 130 | { |
131 | //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); | 131 | //m_log.Info("[ASSET DB]: Asset exists already, ignoring."); |
132 | } | 132 | } |
@@ -136,12 +136,12 @@ namespace OpenSim.Data.SQLite | |||
136 | { | 136 | { |
137 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) | 137 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) |
138 | { | 138 | { |
139 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 139 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.Metadata.FullID))); |
140 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); | 140 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Metadata.Name)); |
141 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); | 141 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Metadata.Description)); |
142 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 142 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Metadata.Type)); |
143 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 143 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Metadata.Local)); |
144 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 144 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Metadata.Temporary)); |
145 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 145 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
146 | 146 | ||
147 | cmd.ExecuteNonQuery(); | 147 | cmd.ExecuteNonQuery(); |
@@ -162,12 +162,12 @@ namespace OpenSim.Data.SQLite | |||
162 | { | 162 | { |
163 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) | 163 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) |
164 | { | 164 | { |
165 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 165 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.Metadata.FullID))); |
166 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); | 166 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Metadata.Name)); |
167 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); | 167 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Metadata.Description)); |
168 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 168 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Metadata.Type)); |
169 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 169 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Metadata.Local)); |
170 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 170 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Metadata.Temporary)); |
171 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 171 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
172 | 172 | ||
173 | cmd.ExecuteNonQuery(); | 173 | cmd.ExecuteNonQuery(); |
@@ -181,14 +181,14 @@ namespace OpenSim.Data.SQLite | |||
181 | /// <param name="asset"></param> | 181 | /// <param name="asset"></param> |
182 | private static void LogAssetLoad(AssetBase asset) | 182 | private static void LogAssetLoad(AssetBase asset) |
183 | { | 183 | { |
184 | string temporary = asset.Temporary ? "Temporary" : "Stored"; | 184 | string temporary = asset.Metadata.Temporary ? "Temporary" : "Stored"; |
185 | string local = asset.Local ? "Local" : "Remote"; | 185 | string local = asset.Metadata.Local ? "Local" : "Remote"; |
186 | 186 | ||
187 | int assetLength = (asset.Data != null) ? asset.Data.Length : 0; | 187 | int assetLength = (asset.Data != null) ? asset.Data.Length : 0; |
188 | 188 | ||
189 | m_log.Info("[ASSET DB]: " + | 189 | m_log.Info("[ASSET DB]: " + |
190 | string.Format("Loaded {6} {5} Asset: [{0}][{3}] \"{1}\":{2} ({7} bytes)", | 190 | string.Format("Loaded {6} {5} Asset: [{0}][{3}] \"{1}\":{2} ({7} bytes)", |
191 | asset.FullID, asset.Name, asset.Description, asset.Type, | 191 | asset.Metadata.FullID, asset.Metadata.Name, asset.Metadata.Description, asset.Metadata.Type, |
192 | temporary, local, assetLength)); | 192 | temporary, local, assetLength)); |
193 | } | 193 | } |
194 | 194 | ||
@@ -246,12 +246,12 @@ namespace OpenSim.Data.SQLite | |||
246 | // back out. Not enough time to figure it out yet. | 246 | // back out. Not enough time to figure it out yet. |
247 | AssetBase asset = new AssetBase(); | 247 | AssetBase asset = new AssetBase(); |
248 | 248 | ||
249 | asset.FullID = new UUID((String) row["UUID"]); | 249 | asset.Metadata.FullID = new UUID((String) row["UUID"]); |
250 | asset.Name = (String) row["Name"]; | 250 | asset.Metadata.Name = (String) row["Name"]; |
251 | asset.Description = (String) row["Description"]; | 251 | asset.Metadata.Description = (String) row["Description"]; |
252 | asset.Type = Convert.ToSByte(row["Type"]); | 252 | asset.Metadata.Type = Convert.ToSByte(row["Type"]); |
253 | asset.Local = Convert.ToBoolean(row["Local"]); | 253 | asset.Metadata.Local = Convert.ToBoolean(row["Local"]); |
254 | asset.Temporary = Convert.ToBoolean(row["Temporary"]); | 254 | asset.Metadata.Temporary = Convert.ToBoolean(row["Temporary"]); |
255 | asset.Data = (byte[]) row["Data"]; | 255 | asset.Data = (byte[]) row["Data"]; |
256 | return asset; | 256 | return asset; |
257 | } | 257 | } |