aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Data/SQLite/SQLiteAssetData.cs
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 34329bb..8d4fb99 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Data.SQLite
51 private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; 51 private const string SelectAssetSQL = "select * from assets where UUID=:UUID";
52 private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; 52 private const string DeleteAssetSQL = "delete from assets where UUID=:UUID";
53 private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)"; 53 private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)";
54 private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; 54 private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID";
55 private const string assetSelect = "select * from assets"; 55 private const string assetSelect = "select * from assets";
56 56
57 private SqliteConnection m_conn; 57 private SqliteConnection m_conn;
@@ -70,11 +70,11 @@ namespace OpenSim.Data.SQLite
70 70
71 override public AssetBase FetchAsset(LLUUID uuid) 71 override public AssetBase FetchAsset(LLUUID uuid)
72 { 72 {
73 73
74 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 74 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
75 { 75 {
76 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 76 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
77 using (IDataReader reader = cmd.ExecuteReader()) 77 using (IDataReader reader = cmd.ExecuteReader())
78 { 78 {
79 if (reader.Read()) 79 if (reader.Read())
80 { 80 {
@@ -98,7 +98,7 @@ namespace OpenSim.Data.SQLite
98 { 98 {
99 m_log.Info("[ASSET DB]: Asset exists already, ignoring."); 99 m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
100 } 100 }
101 else 101 else
102 { 102 {
103 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) 103 using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
104 { 104 {
@@ -110,7 +110,7 @@ namespace OpenSim.Data.SQLite
110 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); 110 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
111 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); 111 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
112 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 112 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
113 113
114 cmd.ExecuteNonQuery(); 114 cmd.ExecuteNonQuery();
115 } 115 }
116 } 116 }
@@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite
119 override public void UpdateAsset(AssetBase asset) 119 override public void UpdateAsset(AssetBase asset)
120 { 120 {
121 LogAssetLoad(asset); 121 LogAssetLoad(asset);
122 122
123 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) 123 using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
124 { 124 {
125 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); 125 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
@@ -130,7 +130,7 @@ namespace OpenSim.Data.SQLite
130 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); 130 cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
131 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); 131 cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
132 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 132 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
133 133
134 cmd.ExecuteNonQuery(); 134 cmd.ExecuteNonQuery();
135 } 135 }
136 136
@@ -154,14 +154,14 @@ namespace OpenSim.Data.SQLite
154 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 154 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
155 { 155 {
156 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 156 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
157 using (IDataReader reader = cmd.ExecuteReader()) 157 using (IDataReader reader = cmd.ExecuteReader())
158 { 158 {
159 if (reader.Read()) 159 if (reader.Read())
160 { 160 {
161 reader.Close(); 161 reader.Close();
162 return true; 162 return true;
163 } 163 }
164 else 164 else
165 { 165 {
166 reader.Close(); 166 reader.Close();
167 return false; 167 return false;
@@ -175,7 +175,7 @@ namespace OpenSim.Data.SQLite
175 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) 175 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
176 { 176 {
177 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); 177 cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
178 178
179 cmd.ExecuteNonQuery(); 179 cmd.ExecuteNonQuery();
180 } 180 }
181 } 181 }
@@ -193,7 +193,7 @@ namespace OpenSim.Data.SQLite
193 /*********************************************************************** 193 /***********************************************************************
194 * 194 *
195 * Database Definition Functions 195 * Database Definition Functions
196 * 196 *
197 * This should be db agnostic as we define them in ADO.NET terms 197 * This should be db agnostic as we define them in ADO.NET terms
198 * 198 *
199 **********************************************************************/ 199 **********************************************************************/
@@ -216,7 +216,7 @@ namespace OpenSim.Data.SQLite
216 } 216 }
217 217
218 /*********************************************************************** 218 /***********************************************************************
219 * 219 *
220 * Convert between ADO.NET <=> OpenSim Objects 220 * Convert between ADO.NET <=> OpenSim Objects
221 * 221 *
222 * These should be database independant 222 * These should be database independant