diff options
author | Justin Clark-Casey (justincc) | 2010-04-30 17:45:00 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-30 19:28:28 +0100 |
commit | 56fe4c24b8c67ec3b6a5a897c35ab19507bd1077 (patch) | |
tree | 8feccd68058c70da1b96d8b6e804aa4afa6dc723 /OpenSim/Data/SQLiteLegacy/SQLiteGenericTableHandler.cs | |
parent | add Mono.Data.Sqlite.dll (diff) | |
download | opensim-SC-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.zip opensim-SC-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.tar.gz opensim-SC-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.tar.bz2 opensim-SC-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.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 | } |