aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Tests/BasicDataServiceTest.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index 82f29d6..e91a45d 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -167,5 +167,46 @@ namespace OpenSim.Data.Tests
167 } 167 }
168 } 168 }
169 } 169 }
170
171 /// <summary>Clear tables listed as parameters (without dropping them).
172 /// </summary>
173 /// <param name="tables"></param>
174 protected virtual void ResetMigrations(params string[] stores)
175 {
176 string lst = "";
177 foreach (string store in stores)
178 {
179 string s = "'" + store + "'";
180 if (lst == "")
181 lst = s;
182 else
183 lst += ", " + s;
184 }
185
186 try
187 {
188 ExecuteSql("DELETE FROM `migrations` where name in (" + lst + ");");
189 }
190 catch
191 {
192 }
193 }
194
195 /// <summary>Clear tables listed as parameters (without dropping them).
196 /// </summary>
197 /// <param name="tables"></param>
198 protected virtual void ClearTables(params string[] tables)
199 {
200 foreach (string tbl in tables)
201 {
202 try
203 {
204 ExecuteSql("DELETE FROM " + tbl + ";");
205 }
206 catch
207 {
208 }
209 }
210 }
170 } 211 }
171} 212}