aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-18 01:35:00 +0100
committerJustin Clark-Casey (justincc)2011-07-18 01:35:00 +0100
commitbdd340b9fc9c7935e4c6e3062759d49ffb92c871 (patch)
tree3728f6058b0d02ce3e1050efaeb5f23b8884baae
parentrefactor: group all the undo/redo code in SOP into one place for easier code ... (diff)
parentrefactor: Pull up Assembly of the SQLite classes as a protected property, so ... (diff)
downloadopensim-SC_OLD-bdd340b9fc9c7935e4c6e3062759d49ffb92c871.zip
opensim-SC_OLD-bdd340b9fc9c7935e4c6e3062759d49ffb92c871.tar.gz
opensim-SC_OLD-bdd340b9fc9c7935e4c6e3062759d49ffb92c871.tar.bz2
opensim-SC_OLD-bdd340b9fc9c7935e4c6e3062759d49ffb92c871.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteAuthenticationData.cs7
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs10
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteXInventoryData.cs2
6 files changed, 32 insertions, 11 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 5b71897..bb23fc1 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -57,6 +57,11 @@ namespace OpenSim.Data.SQLite
57 57
58 private SqliteConnection m_conn; 58 private SqliteConnection m_conn;
59 59
60 protected virtual Assembly Assembly
61 {
62 get { return GetType().Assembly; }
63 }
64
60 override public void Dispose() 65 override public void Dispose()
61 { 66 {
62 if (m_conn != null) 67 if (m_conn != null)
@@ -83,8 +88,7 @@ namespace OpenSim.Data.SQLite
83 m_conn = new SqliteConnection(dbconnect); 88 m_conn = new SqliteConnection(dbconnect);
84 m_conn.Open(); 89 m_conn.Open();
85 90
86 Assembly assem = GetType().Assembly; 91 Migration m = new Migration(m_conn, Assembly, "AssetStore");
87 Migration m = new Migration(m_conn, assem, "AssetStore");
88 m.Update(); 92 m.Update();
89 93
90 return; 94 return;
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index c3b65bb..f51aa28 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
53 protected static SqliteConnection m_Connection; 53 protected static SqliteConnection m_Connection;
54 private static bool m_initialized = false; 54 private static bool m_initialized = false;
55 55
56 protected virtual Assembly Assembly
57 {
58 get { return GetType().Assembly; }
59 }
60
56 public SQLiteAuthenticationData(string connectionString, string realm) 61 public SQLiteAuthenticationData(string connectionString, string realm)
57 : base(connectionString) 62 : base(connectionString)
58 { 63 {
@@ -63,7 +68,7 @@ namespace OpenSim.Data.SQLite
63 m_Connection = new SqliteConnection(connectionString); 68 m_Connection = new SqliteConnection(connectionString);
64 m_Connection.Open(); 69 m_Connection.Open();
65 70
66 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore"); 71 Migration m = new Migration(m_Connection, Assembly, "AuthStore");
67 m.Update(); 72 m.Update();
68 73
69 m_initialized = true; 74 m_initialized = true;
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 2f05a6e..65719a6 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
53 private Dictionary<string, FieldInfo> m_FieldMap = 53 private Dictionary<string, FieldInfo> m_FieldMap =
54 new Dictionary<string, FieldInfo>(); 54 new Dictionary<string, FieldInfo>();
55 55
56 protected virtual Assembly Assembly
57 {
58 get { return GetType().Assembly; }
59 }
60
56 public SQLiteEstateStore() 61 public SQLiteEstateStore()
57 { 62 {
58 } 63 }
@@ -71,8 +76,7 @@ namespace OpenSim.Data.SQLite
71 m_connection = new SqliteConnection(m_connectionString); 76 m_connection = new SqliteConnection(m_connectionString);
72 m_connection.Open(); 77 m_connection.Open();
73 78
74 Assembly assem = GetType().Assembly; 79 Migration m = new Migration(m_connection, Assembly, "EstateStore");
75 Migration m = new Migration(m_connection, assem, "EstateStore");
76 m.Update(); 80 m.Update();
77 81
78 //m_connection.Close(); 82 //m_connection.Close();
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 0d7ae1f..4f977a8 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -55,6 +55,11 @@ namespace OpenSim.Data.SQLite
55 protected static SqliteConnection m_Connection; 55 protected static SqliteConnection m_Connection;
56 private static bool m_initialized; 56 private static bool m_initialized;
57 57
58 protected virtual Assembly Assembly
59 {
60 get { return GetType().Assembly; }
61 }
62
58 public SQLiteGenericTableHandler(string connectionString, 63 public SQLiteGenericTableHandler(string connectionString,
59 string realm, string storeName) : base(connectionString) 64 string realm, string storeName) : base(connectionString)
60 { 65 {
@@ -68,13 +73,12 @@ namespace OpenSim.Data.SQLite
68 73
69 if (storeName != String.Empty) 74 if (storeName != String.Empty)
70 { 75 {
71 Assembly assem = GetType().Assembly;
72 //SqliteConnection newConnection = 76 //SqliteConnection newConnection =
73 // (SqliteConnection)((ICloneable)m_Connection).Clone(); 77 // (SqliteConnection)((ICloneable)m_Connection).Clone();
74 //newConnection.Open(); 78 //newConnection.Open();
75 79
76 //Migration m = new Migration(newConnection, assem, storeName); 80 //Migration m = new Migration(newConnection, Assembly, storeName);
77 Migration m = new Migration(m_Connection, assem, storeName); 81 Migration m = new Migration(m_Connection, Assembly, storeName);
78 m.Update(); 82 m.Update();
79 //newConnection.Close(); 83 //newConnection.Close();
80 //newConnection.Dispose(); 84 //newConnection.Dispose();
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 377c680..5618772 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -74,6 +74,11 @@ namespace OpenSim.Data.SQLite
74 74
75 private String m_connectionString; 75 private String m_connectionString;
76 76
77 protected virtual Assembly Assembly
78 {
79 get { return GetType().Assembly; }
80 }
81
77 public SQLiteSimulationData() 82 public SQLiteSimulationData()
78 { 83 {
79 } 84 }
@@ -132,8 +137,7 @@ namespace OpenSim.Data.SQLite
132 SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn); 137 SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn);
133 regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd); 138 regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd);
134 // This actually does the roll forward assembly stuff 139 // This actually does the roll forward assembly stuff
135 Assembly assem = GetType().Assembly; 140 Migration m = new Migration(m_conn, Assembly, "RegionStore");
136 Migration m = new Migration(m_conn, assem, "RegionStore");
137 m.Update(); 141 m.Update();
138 142
139 lock (ds) 143 lock (ds)
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index 02edc30..16f9046 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -41,7 +41,7 @@ using OpenSim.Framework;
41namespace OpenSim.Data.SQLite 41namespace OpenSim.Data.SQLite
42{ 42{
43 /// <summary> 43 /// <summary>
44 /// A MySQL Interface for the Asset Server 44 /// A SQLite Interface for the Asset Server
45 /// </summary> 45 /// </summary>
46 public class SQLiteXInventoryData : IXInventoryData 46 public class SQLiteXInventoryData : IXInventoryData
47 { 47 {