diff options
author | Justin Clark-Casey (justincc) | 2010-04-30 17:45:00 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-30 17:45:00 +0100 |
commit | cc67de5b86ebcebadbe2ea46872a0dc63d99cae7 (patch) | |
tree | 1607da4eee9e63fe45e0abcf05da37ae5e239d70 /OpenSim/Data/SQLiteLegacy/SQLiteGenericTableHandler.cs | |
parent | Make SQLiteNG the default since it actually does work with Mono 2.4 on Linux. (diff) | |
download | opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.zip opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.gz opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.bz2 opensim-SC-cc67de5b86ebcebadbe2ea46872a0dc63d99cae7.tar.xz |
rename SQLiteNG to SQLite and SQLite to SQLiteLegacy
this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was SQLiteNG
MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if using standalone)
See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details
This commit also temporarily changes unsigned ParentEstateID values in the OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies). And change data columns in sqlite is a pita.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteGenericTableHandler.cs (renamed from OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs) | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLiteLegacy/SQLiteGenericTableHandler.cs index 632c5bf..1c1fe8c 100644 --- a/OpenSim/Data/SQLiteNG/SQLiteGenericTableHandler.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteGenericTableHandler.cs | |||
@@ -30,12 +30,12 @@ using System.Collections.Generic; | |||
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Data.Sqlite; | 33 | using Mono.Data.SqliteClient; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | 37 | ||
38 | namespace OpenSim.Data.SQLiteNG | 38 | namespace OpenSim.Data.SQLiteLegacy |
39 | { | 39 | { |
40 | public class SQLiteGenericTableHandler<T> : SQLiteFramework where T: class, new() | 40 | public class SQLiteGenericTableHandler<T> : SQLiteFramework where T: class, new() |
41 | { | 41 | { |
@@ -59,21 +59,19 @@ namespace OpenSim.Data.SQLiteNG | |||
59 | if (!m_initialized) | 59 | if (!m_initialized) |
60 | { | 60 | { |
61 | m_Connection = new SqliteConnection(connectionString); | 61 | m_Connection = new SqliteConnection(connectionString); |
62 | Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString)); | ||
63 | m_Connection.Open(); | 62 | m_Connection.Open(); |
64 | 63 | ||
65 | if (storeName != String.Empty) | 64 | if (storeName != String.Empty) |
66 | { | 65 | { |
67 | Assembly assem = GetType().Assembly; | 66 | Assembly assem = GetType().Assembly; |
68 | //SqliteConnection newConnection = | 67 | SqliteConnection newConnection = |
69 | // (SqliteConnection)((ICloneable)m_Connection).Clone(); | 68 | (SqliteConnection)((ICloneable)m_Connection).Clone(); |
70 | //newConnection.Open(); | 69 | newConnection.Open(); |
71 | 70 | ||
72 | //Migration m = new Migration(newConnection, assem, storeName); | 71 | Migration m = new Migration(newConnection, assem, storeName); |
73 | Migration m = new Migration(m_Connection, assem, storeName); | ||
74 | m.Update(); | 72 | m.Update(); |
75 | //newConnection.Close(); | 73 | newConnection.Close(); |
76 | //newConnection.Dispose(); | 74 | newConnection.Dispose(); |
77 | } | 75 | } |
78 | 76 | ||
79 | m_initialized = true; | 77 | m_initialized = true; |
@@ -199,7 +197,7 @@ namespace OpenSim.Data.SQLiteNG | |||
199 | result.Add(row); | 197 | result.Add(row); |
200 | } | 198 | } |
201 | 199 | ||
202 | //CloseCommand(cmd); | 200 | CloseCommand(cmd); |
203 | 201 | ||
204 | return result.ToArray(); | 202 | return result.ToArray(); |
205 | } | 203 | } |