aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/NHibernate')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index db90d09..7bd4a0b 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -50,18 +50,24 @@ namespace OpenSim.Data.NHibernate
50 50
51 public override void Initialise() 51 public override void Initialise()
52 { 52 {
53 // TODO: hard coding for sqlite based stuff to begin with, just making it easier to test 53 Initialise("SQLiteDialect;SqliteClientDriver;URI=file:Asset.db,version=3");
54 }
54 55
56 public override void Initialise(string connect)
57 {
58 // TODO: hard coding for sqlite based stuff to begin with, just making it easier to test
59 char[] split = {';'};
60 string[] parts = connect.Split(split);
61
55 // This is stubbing for now, it will become dynamic later and support different db backends 62 // This is stubbing for now, it will become dynamic later and support different db backends
56 cfg = new Configuration(); 63 cfg = new Configuration();
57 cfg.SetProperty(Environment.ConnectionProvider, 64 cfg.SetProperty(Environment.ConnectionProvider,
58 "NHibernate.Connection.DriverConnectionProvider"); 65 "NHibernate.Connection.DriverConnectionProvider");
59 cfg.SetProperty(Environment.Dialect, 66 cfg.SetProperty(Environment.Dialect,
60 "NHibernate.Dialect.SQLiteDialect"); 67 "NHibernate.Dialect." + parts[0]);
61 cfg.SetProperty(Environment.ConnectionDriver, 68 cfg.SetProperty(Environment.ConnectionDriver,
62 "NHibernate.Driver.SqliteClientDriver"); 69 "NHibernate.Driver." + parts[1]);
63 cfg.SetProperty(Environment.ConnectionString, 70 cfg.SetProperty(Environment.ConnectionString, parts[2]);
64 "URI=file:Asset.db,version=3");
65 cfg.AddAssembly("OpenSim.Data.NHibernate"); 71 cfg.AddAssembly("OpenSim.Data.NHibernate");
66 72
67 HbmSerializer.Default.Validate = true; 73 HbmSerializer.Default.Validate = true;