aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Storage
diff options
context:
space:
mode:
authorAdam Frisby2007-04-27 21:11:02 +0000
committerAdam Frisby2007-04-27 21:11:02 +0000
commit6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0 (patch)
treefa25cc297d83f70080b21f78e3bc04d32df5b00f /OpenSim.Storage
parent* Added new commandline option -config <configfile.xml> (diff)
downloadopensim-SC_OLD-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.zip
opensim-SC_OLD-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.gz
opensim-SC_OLD-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.bz2
opensim-SC_OLD-6ce5b6e439e304ba8ce27a9e5bad3146feedd7f0.tar.xz
Major ass commit
Added new "Datastore" parameter to simconfig.xml which is passed to storage engines via a new Initialise() function.
Diffstat (limited to 'OpenSim.Storage')
-rw-r--r--OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs5
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs29
-rw-r--r--OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs5
3 files changed, 28 insertions, 11 deletions
diff --git a/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
index 2bcd91c..d4db8c0 100644
--- a/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
+++ b/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
@@ -56,6 +56,11 @@ namespace OpenSim.Storage.LocalStorageBDB
56 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); 56 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0);
57 } 57 }
58 58
59 public void Initialise(string file)
60 {
61 // Blank
62 }
63
59 public void StorePrim(PrimData prim) 64 public void StorePrim(PrimData prim)
60 { 65 {
61 DbEntry key = new DbEntry(); 66 DbEntry key = new DbEntry();
diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 488da58..3c17f1f 100644
--- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -41,21 +41,28 @@ namespace OpenSim.Storage.LocalStorageDb4o
41 public class Db4LocalStorage : ILocalStorage 41 public class Db4LocalStorage : ILocalStorage
42 { 42 {
43 private IObjectContainer db; 43 private IObjectContainer db;
44 private string datastore;
44 45
45 public Db4LocalStorage() 46 public Db4LocalStorage()
46 { 47 {
47 try 48
48 {
49 db = Db4oFactory.OpenFile("localworld.yap");
50 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
51 }
52 catch(Exception e)
53 {
54 db.Close();
55 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
56 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
57 }
58 } 49 }
50
51 public void Initialise(string dfile)
52 {
53 datastore = dfile;
54 try
55 {
56 db = Db4oFactory.OpenFile(datastore);
57 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
58 }
59 catch (Exception e)
60 {
61 db.Close();
62 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
64 }
65 }
59 66
60 public void StorePrim(PrimData prim) 67 public void StorePrim(PrimData prim)
61 { 68 {
diff --git a/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
index ff7b146..35875a1 100644
--- a/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ b/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
@@ -59,6 +59,11 @@ namespace OpenSim.Storage.LocalStorageSQLite
59 } 59 }
60 } 60 }
61 61
62 public void Initialise(string file)
63 {
64 // Blank
65 }
66
62 public void StorePrim(PrimData prim) 67 public void StorePrim(PrimData prim)
63 { 68 {
64 IDbCommand cmd = db.CreateCommand(); 69 IDbCommand cmd = db.CreateCommand();