From a18489dc9badfccd775145f5a1a800a763d0c554 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 16 Oct 2009 12:20:01 -0700 Subject: * Change appearance packets from State to Task. This will hopefully fix the cloud issues * Changed the throttling logic to obey the requested client bandwidth limit but also share bandwidth between some of the categories to improve throughput on high prim or heavily trafficked regions --- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index fe0914b..839ac7f 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -401,6 +401,7 @@ namespace OpenSim.Data.MySQL Dictionary objects = new Dictionary(); Dictionary prims = new Dictionary(); SceneObjectGroup grp = null; + int count = 0; lock (m_Connection) { @@ -463,6 +464,10 @@ namespace OpenSim.Data.MySQL if (link != 0) prim.LinkNum = link; } + + ++count; + if (count % 5000 == 0) + m_log.Debug("[REGION DB]: Loaded " + count + " prims..."); } } -- cgit v1.1 From e776dfb1d71ea7f8de37399f84fceb005870e861 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 16 Oct 2009 13:22:45 -0700 Subject: * Changing the "clean dropped attachments" MySQL command to a using statement inside a try/catch. This statement times out for me very frequently * More verbose logging when zerocoding fails on an outbound packet --- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index 839ac7f..6bc8bec 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -68,12 +68,20 @@ namespace OpenSim.Data.MySQL // Clean dropped attachments // - MySqlCommand cmd = m_Connection.CreateCommand(); - cmd.CommandText = "delete from prims, primshapes using prims " + - "left join primshapes on prims.uuid = primshapes.uuid " + - "where PCode = 9 and State <> 0"; - ExecuteNonQuery(cmd); - cmd.Dispose(); + try + { + using (MySqlCommand cmd = m_Connection.CreateCommand()) + { + cmd.CommandText = "delete from prims, primshapes using prims " + + "left join primshapes on prims.uuid = primshapes.uuid " + + "where PCode = 9 and State <> 0"; + ExecuteNonQuery(cmd); + } + } + catch (MySqlException ex) + { + m_log.Error("[REGION DB]: Error cleaning up dropped attachments: " + ex.Message); + } } private IDataReader ExecuteReader(MySqlCommand c) -- cgit v1.1 From b4526a5a6d170e04655990c8edb8e355156a2061 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 18 Oct 2009 02:00:42 -0700 Subject: * Big performance increase in loading prims from the region database with MySQL * Handle the AgentFOV packet * Bypass queuing and throttles for ping checks to make ping times more closely match network latency * Only track reliable bytes in LLUDPCLient.BytesSinceLastACK --- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | 271 ++++++++++++++-------------- 1 file changed, 138 insertions(+), 133 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index 6bc8bec..801d6b9 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -403,26 +403,23 @@ namespace OpenSim.Data.MySQL } } - public List LoadObjects(UUID regionUUID) + public List LoadObjects(UUID regionID) { - UUID lastGroupID = UUID.Zero; + const int ROWS_PER_QUERY = 5000; + + Dictionary prims = new Dictionary(ROWS_PER_QUERY); Dictionary objects = new Dictionary(); - Dictionary prims = new Dictionary(); - SceneObjectGroup grp = null; int count = 0; + #region Prim Loading + lock (m_Connection) { using (MySqlCommand cmd = m_Connection.CreateCommand()) { - cmd.CommandText = "select *, " + - "case when prims.UUID = SceneGroupID " + - "then 0 else 1 end as sort from prims " + - "left join primshapes on prims.UUID = primshapes.UUID " + - "where RegionUUID = ?RegionUUID " + - "order by SceneGroupID asc, sort asc, LinkNumber asc"; - - cmd.Parameters.AddWithValue("RegionUUID", regionUUID.ToString()); + cmd.CommandText = + "SELECT * FROM prims LEFT JOIN primshapes ON prims.UUID = primshapes.UUID WHERE RegionUUID = ?RegionUUID"; + cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString()); using (IDataReader reader = ExecuteReader(cmd)) { @@ -434,56 +431,61 @@ namespace OpenSim.Data.MySQL else prim.Shape = BuildShape(reader); - prims[prim.UUID] = prim; - - UUID groupID = new UUID(reader["SceneGroupID"].ToString()); + UUID parentID = new UUID(reader["SceneGroupID"].ToString()); + if (parentID != prim.UUID) + prim.ParentUUID = parentID; - if (groupID != lastGroupID) // New SOG - { - if (grp != null) - objects[grp.UUID] = grp; + prims[prim.UUID] = prim; - lastGroupID = groupID; + ++count; + if (count % ROWS_PER_QUERY == 0) + m_log.Debug("[REGION DB]: Loaded " + count + " prims..."); + } + } + } + } - // There sometimes exist OpenSim bugs that 'orphan groups' so that none of the prims are - // recorded as the root prim (for which the UUID must equal the persisted group UUID). In - // this case, force the UUID to be the same as the group UUID so that at least these can be - // deleted (we need to change the UUID so that any other prims in the linkset can also be - // deleted). - if (prim.UUID != groupID && groupID != UUID.Zero) - { - m_log.WarnFormat( - "[REGION DB]: Found root prim {0} {1} at {2} where group was actually {3}. Forcing UUID to group UUID", - prim.Name, prim.UUID, prim.GroupPosition, groupID); + #endregion Prim Loading - prim.UUID = groupID; - } + #region SceneObjectGroup Creation - grp = new SceneObjectGroup(prim); - } - else - { - // Black magic to preserve link numbers - // - int link = prim.LinkNum; + // Create all of the SOGs from the root prims first + foreach (SceneObjectPart prim in prims.Values) + { + if (prim.ParentUUID == UUID.Zero) + objects[prim.UUID] = new SceneObjectGroup(prim); + } - grp.AddPart(prim); + // Add all of the children objects to the SOGs + foreach (SceneObjectPart prim in prims.Values) + { + SceneObjectGroup sog; + if (prim.UUID != prim.ParentUUID) + { + if (objects.TryGetValue(prim.ParentUUID, out sog)) + { + int originalLinkNum = prim.LinkNum; - if (link != 0) - prim.LinkNum = link; - } + sog.AddPart(prim); - ++count; - if (count % 5000 == 0) - m_log.Debug("[REGION DB]: Loaded " + count + " prims..."); - } + // SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum. + // We override that here + if (originalLinkNum != 0) + prim.LinkNum = originalLinkNum; + } + else + { + m_log.Warn("[REGION DB]: Database contains an orphan child prim " + prim.UUID + " pointing to missing parent " + prim.ParentUUID); } - - if (grp != null) - objects[grp.UUID] = grp; } } + #endregion SceneObjectGroup Creation + + m_log.DebugFormat("[REGION DB]: Loaded {0} objects using {1} prims", objects.Count, prims.Count); + + #region Prim Inventory Loading + // Instead of attempting to LoadItems on every prim, // most of which probably have no items... get a // list from DB of all prims which have items and @@ -493,7 +495,7 @@ namespace OpenSim.Data.MySQL { using (MySqlCommand itemCmd = m_Connection.CreateCommand()) { - itemCmd.CommandText = "select distinct primID from primitems"; + itemCmd.CommandText = "SELECT DISTINCT primID FROM primitems"; using (IDataReader itemReader = ExecuteReader(itemCmd)) { while (itemReader.Read()) @@ -502,9 +504,7 @@ namespace OpenSim.Data.MySQL { UUID primID = new UUID(itemReader["primID"].ToString()); if (prims.ContainsKey(primID)) - { primsWithInventory.Add(prims[primID]); - } } } } @@ -512,9 +512,14 @@ namespace OpenSim.Data.MySQL } foreach (SceneObjectPart prim in primsWithInventory) + { LoadItems(prim); + } + + #endregion Prim Inventory Loading + + m_log.DebugFormat("[REGION DB]: Loaded inventory from {0} objects", primsWithInventory.Count); - m_log.DebugFormat("[REGION DB]: Loaded {0} objects using {1} prims", objects.Count, prims.Count); return new List(objects.Values); } @@ -811,137 +816,137 @@ namespace OpenSim.Data.MySQL private SceneObjectPart BuildPrim(IDataReader row) { SceneObjectPart prim = new SceneObjectPart(); - prim.UUID = new UUID((String) row["UUID"]); + prim.UUID = new UUID((string)row["UUID"]); // explicit conversion of integers is required, which sort // of sucks. No idea if there is a shortcut here or not. - prim.CreationDate = Convert.ToInt32(row["CreationDate"]); + prim.CreationDate = (int)row["CreationDate"]; if (row["Name"] != DBNull.Value) - prim.Name = (String)row["Name"]; + prim.Name = (string)row["Name"]; else - prim.Name = string.Empty; - // various text fields - prim.Text = (String) row["Text"]; - prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorA"]), - Convert.ToInt32(row["ColorR"]), - Convert.ToInt32(row["ColorG"]), - Convert.ToInt32(row["ColorB"])); - prim.Description = (String) row["Description"]; - prim.SitName = (String) row["SitName"]; - prim.TouchName = (String) row["TouchName"]; - // permissions - prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); - prim.CreatorID = new UUID((String) row["CreatorID"]); - prim.OwnerID = new UUID((String) row["OwnerID"]); - prim.GroupID = new UUID((String) row["GroupID"]); - prim.LastOwnerID = new UUID((String) row["LastOwnerID"]); - prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); - prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); - prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); - prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); - prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); - // vectors + prim.Name = String.Empty; + // Various text fields + prim.Text = (string)row["Text"]; + prim.Color = Color.FromArgb((int)row["ColorA"], + (int)row["ColorR"], + (int)row["ColorG"], + (int)row["ColorB"]); + prim.Description = (string)row["Description"]; + prim.SitName = (string)row["SitName"]; + prim.TouchName = (string)row["TouchName"]; + // Permissions + prim.ObjectFlags = (uint)(int)row["ObjectFlags"]; + prim.CreatorID = new UUID((string)row["CreatorID"]); + prim.OwnerID = new UUID((string)row["OwnerID"]); + prim.GroupID = new UUID((string)row["GroupID"]); + prim.LastOwnerID = new UUID((string)row["LastOwnerID"]); + prim.OwnerMask = (uint)(int)row["OwnerMask"]; + prim.NextOwnerMask = (uint)(int)row["NextOwnerMask"]; + prim.GroupMask = (uint)(int)row["GroupMask"]; + prim.EveryoneMask = (uint)(int)row["EveryoneMask"]; + prim.BaseMask = (uint)(int)row["BaseMask"]; + // Vectors prim.OffsetPosition = new Vector3( - Convert.ToSingle(row["PositionX"]), - Convert.ToSingle(row["PositionY"]), - Convert.ToSingle(row["PositionZ"]) + (float)(double)row["PositionX"], + (float)(double)row["PositionY"], + (float)(double)row["PositionZ"] ); prim.GroupPosition = new Vector3( - Convert.ToSingle(row["GroupPositionX"]), - Convert.ToSingle(row["GroupPositionY"]), - Convert.ToSingle(row["GroupPositionZ"]) + (float)(double)row["GroupPositionX"], + (float)(double)row["GroupPositionY"], + (float)(double)row["GroupPositionZ"] ); prim.Velocity = new Vector3( - Convert.ToSingle(row["VelocityX"]), - Convert.ToSingle(row["VelocityY"]), - Convert.ToSingle(row["VelocityZ"]) + (float)(double)row["VelocityX"], + (float)(double)row["VelocityY"], + (float)(double)row["VelocityZ"] ); prim.AngularVelocity = new Vector3( - Convert.ToSingle(row["AngularVelocityX"]), - Convert.ToSingle(row["AngularVelocityY"]), - Convert.ToSingle(row["AngularVelocityZ"]) + (float)(double)row["AngularVelocityX"], + (float)(double)row["AngularVelocityY"], + (float)(double)row["AngularVelocityZ"] ); prim.Acceleration = new Vector3( - Convert.ToSingle(row["AccelerationX"]), - Convert.ToSingle(row["AccelerationY"]), - Convert.ToSingle(row["AccelerationZ"]) + (float)(double)row["AccelerationX"], + (float)(double)row["AccelerationY"], + (float)(double)row["AccelerationZ"] ); // quaternions prim.RotationOffset = new Quaternion( - Convert.ToSingle(row["RotationX"]), - Convert.ToSingle(row["RotationY"]), - Convert.ToSingle(row["RotationZ"]), - Convert.ToSingle(row["RotationW"]) + (float)(double)row["RotationX"], + (float)(double)row["RotationY"], + (float)(double)row["RotationZ"], + (float)(double)row["RotationW"] ); prim.SitTargetPositionLL = new Vector3( - Convert.ToSingle(row["SitTargetOffsetX"]), - Convert.ToSingle(row["SitTargetOffsetY"]), - Convert.ToSingle(row["SitTargetOffsetZ"]) + (float)(double)row["SitTargetOffsetX"], + (float)(double)row["SitTargetOffsetY"], + (float)(double)row["SitTargetOffsetZ"] ); prim.SitTargetOrientationLL = new Quaternion( - Convert.ToSingle(row["SitTargetOrientX"]), - Convert.ToSingle(row["SitTargetOrientY"]), - Convert.ToSingle(row["SitTargetOrientZ"]), - Convert.ToSingle(row["SitTargetOrientW"]) + (float)(double)row["SitTargetOrientX"], + (float)(double)row["SitTargetOrientY"], + (float)(double)row["SitTargetOrientZ"], + (float)(double)row["SitTargetOrientW"] ); - prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]); - prim.PayPrice[1] = Convert.ToInt32(row["PayButton1"]); - prim.PayPrice[2] = Convert.ToInt32(row["PayButton2"]); - prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); - prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); + prim.PayPrice[0] = (int)row["PayPrice"]; + prim.PayPrice[1] = (int)row["PayButton1"]; + prim.PayPrice[2] = (int)row["PayButton2"]; + prim.PayPrice[3] = (int)row["PayButton3"]; + prim.PayPrice[4] = (int)row["PayButton4"]; prim.Sound = new UUID(row["LoopedSound"].ToString()); - prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); + prim.SoundGain = (float)(double)row["LoopedSoundGain"]; prim.SoundFlags = 1; // If it's persisted at all, it's looped if (!(row["TextureAnimation"] is DBNull)) - prim.TextureAnimation = (Byte[])row["TextureAnimation"]; + prim.TextureAnimation = (byte[])row["TextureAnimation"]; if (!(row["ParticleSystem"] is DBNull)) - prim.ParticleSystem = (Byte[])row["ParticleSystem"]; + prim.ParticleSystem = (byte[])row["ParticleSystem"]; prim.RotationalVelocity = new Vector3( - Convert.ToSingle(row["OmegaX"]), - Convert.ToSingle(row["OmegaY"]), - Convert.ToSingle(row["OmegaZ"]) + (float)(double)row["OmegaX"], + (float)(double)row["OmegaY"], + (float)(double)row["OmegaZ"] ); prim.SetCameraEyeOffset(new Vector3( - Convert.ToSingle(row["CameraEyeOffsetX"]), - Convert.ToSingle(row["CameraEyeOffsetY"]), - Convert.ToSingle(row["CameraEyeOffsetZ"]) + (float)(double)row["CameraEyeOffsetX"], + (float)(double)row["CameraEyeOffsetY"], + (float)(double)row["CameraEyeOffsetZ"] )); prim.SetCameraAtOffset(new Vector3( - Convert.ToSingle(row["CameraAtOffsetX"]), - Convert.ToSingle(row["CameraAtOffsetY"]), - Convert.ToSingle(row["CameraAtOffsetZ"]) + (float)(double)row["CameraAtOffsetX"], + (float)(double)row["CameraAtOffsetY"], + (float)(double)row["CameraAtOffsetZ"] )); - if (Convert.ToInt16(row["ForceMouselook"]) != 0) + if ((sbyte)row["ForceMouselook"] != 0) prim.SetForceMouselook(true); - prim.ScriptAccessPin = Convert.ToInt32(row["ScriptAccessPin"]); + prim.ScriptAccessPin = (int)row["ScriptAccessPin"]; - if (Convert.ToInt16(row["AllowedDrop"]) != 0) + if ((sbyte)row["AllowedDrop"] != 0) prim.AllowedDrop = true; - if (Convert.ToInt16(row["DieAtEdge"]) != 0) + if ((sbyte)row["DieAtEdge"] != 0) prim.DIE_AT_EDGE = true; - prim.SalePrice = Convert.ToInt32(row["SalePrice"]); - prim.ObjectSaleType = unchecked((byte)Convert.ToSByte(row["SaleType"])); + prim.SalePrice = (int)row["SalePrice"]; + prim.ObjectSaleType = unchecked((byte)(sbyte)row["SaleType"]); - prim.Material = unchecked((byte)Convert.ToSByte(row["Material"])); + prim.Material = unchecked((byte)(sbyte)row["Material"]); if (!(row["ClickAction"] is DBNull)) - prim.ClickAction = unchecked((byte)Convert.ToSByte(row["ClickAction"])); + prim.ClickAction = unchecked((byte)(sbyte)row["ClickAction"]); prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); - prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); + prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; - if (Convert.ToInt16(row["PassTouches"]) != 0) + if ((sbyte)row["PassTouches"] != 0) prim.PassTouches = true; - prim.LinkNum = Convert.ToInt32(row["LinkNumber"]); + prim.LinkNum = (int)row["LinkNumber"]; return prim; } -- cgit v1.1 From fdce1be3db287bed901332b90ba57165e201d3fc Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 19 Oct 2009 16:52:27 -0700 Subject: * Removed OpenSim.Data.NHibernate * Replaced calls to ThreadPool.QueueUserWorkItem() with ThreadPool.UnsafeQueueUserWorkItem() since OpenSim does not use Code Access Security sandboxing --- OpenSim/Data/NHibernate/ColorUserType.cs | 104 ----- OpenSim/Data/NHibernate/EstateRegionLink.cs | 76 ---- OpenSim/Data/NHibernate/LLQuaternionUserType.cs | 119 ------ OpenSim/Data/NHibernate/LLUUIDUserType.cs | 105 ----- OpenSim/Data/NHibernate/LLVector3UserType.cs | 110 ----- OpenSim/Data/NHibernate/Migration/README.txt | 3 - OpenSim/Data/NHibernate/Migration/SqliteAssets.sql | 5 - .../Data/NHibernate/Migration/SqliteInventory.pl | 43 -- OpenSim/Data/NHibernate/NHibernateAssetData.cs | 135 ------ OpenSim/Data/NHibernate/NHibernateEstateData.cs | 168 -------- OpenSim/Data/NHibernate/NHibernateGridData.cs | 236 ----------- OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 382 ----------------- OpenSim/Data/NHibernate/NHibernateManager.cs | 345 --------------- OpenSim/Data/NHibernate/NHibernateRegionData.cs | 426 ------------------- OpenSim/Data/NHibernate/NHibernateUserData.cs | 461 --------------------- .../Data/NHibernate/Resources/AssetBase.hbm.xml | 14 - .../NHibernate/Resources/EstateRegionLink.hbm.xml | 12 - .../NHibernate/Resources/EstateSettings.hbm.xml | 68 --- .../Resources/InventoryFolderBase.hbm.xml | 13 - .../NHibernate/Resources/InventoryItemBase.hbm.xml | 26 -- .../Resources/MigrationSyntaxDifferences.txt | 14 - .../Resources/MsSql2005Dialect/001_AssetStore.sql | 10 - .../Resources/MsSql2005Dialect/001_EstateStore.sql | 72 ---- .../Resources/MsSql2005Dialect/001_GridStore.sql | 35 -- .../MsSql2005Dialect/001_InventoryStore.sql | 36 -- .../Resources/MsSql2005Dialect/001_RegionStore.sql | 104 ----- .../Resources/MsSql2005Dialect/001_UserStore.sql | 77 ---- .../Resources/MsSql2005Dialect/002_RegionStore.sql | 51 --- .../Resources/MsSql2005Dialect/002_UserStore.sql | 27 -- .../Resources/MySQLDialect/001_AssetStore.sql | 10 - .../Resources/MySQLDialect/001_EstateStore.sql | 71 ---- .../Resources/MySQLDialect/001_GridStore.sql | 35 -- .../Resources/MySQLDialect/001_InventoryStore.sql | 39 -- .../Resources/MySQLDialect/001_RegionStore.sql | 169 -------- .../Resources/MySQLDialect/001_UserStore.sql | 104 ----- .../Resources/OpenSim.Data.NHibernate.addin.xml | 23 - .../Resources/PostgreSQLDialect/001_AssetStore.sql | 10 - .../PostgreSQLDialect/001_EstateStore.sql | 72 ---- .../Resources/PostgreSQLDialect/001_GridStore.sql | 35 -- .../PostgreSQLDialect/001_InventoryStore.sql | 39 -- .../PostgreSQLDialect/001_RegionStore.sql | 169 -------- .../Resources/PostgreSQLDialect/001_UserStore.sql | 104 ----- .../NHibernate/Resources/RegionProfileData.hbm.xml | 44 -- .../NHibernate/Resources/RegionSettings.hbm.xml | 56 --- .../Data/NHibernate/Resources/RegionStore.hbm.xml | 147 ------- .../Resources/SQLiteDialect/001_AssetStore.sql | 10 - .../Resources/SQLiteDialect/001_EstateStore.sql | 71 ---- .../Resources/SQLiteDialect/001_GridStore.sql | 35 -- .../Resources/SQLiteDialect/001_InventoryStore.sql | 39 -- .../Resources/SQLiteDialect/001_RegionStore.sql | 168 -------- .../Resources/SQLiteDialect/001_UserStore.sql | 104 ----- .../NHibernate/Resources/UserAgentData.hbm.xml | 32 -- .../NHibernate/Resources/UserAppearance.hbm.xml | 38 -- .../Data/NHibernate/Resources/UserFriend.hbm.xml | 11 - .../NHibernate/Resources/UserProfileData.hbm.xml | 38 -- OpenSim/Data/NHibernate/SByteType.cs | 111 ----- OpenSim/Data/NHibernate/Terrain.cs | 118 ------ .../NHibernate/Tests/NHibernateMsSqlAssetTest.cs | 81 ---- .../NHibernate/Tests/NHibernateMsSqlEstateTest.cs | 81 ---- .../NHibernate/Tests/NHibernateMsSqlGridTest.cs | 79 ---- .../Tests/NHibernateMsSqlInventoryTest.cs | 80 ---- .../NHibernate/Tests/NHibernateMsSqlRegionTest.cs | 81 ---- .../NHibernate/Tests/NHibernateMsSqlUserTest.cs | 79 ---- .../NHibernate/Tests/NHibernateMySQLAssetTest.cs | 80 ---- .../NHibernate/Tests/NHibernateMySQLGridTest.cs | 79 ---- .../Tests/NHibernateMySQLInventoryTest.cs | 80 ---- .../NHibernate/Tests/NHibernateMySQLRegionTest.cs | 81 ---- .../NHibernate/Tests/NHibernateMySQLUserTest.cs | 79 ---- .../NHibernate/Tests/NHibernateMySqlEstateTest.cs | 80 ---- .../Tests/NHibernatePostgreSQLAssetTest.cs | 80 ---- .../Tests/NHibernatePostgreSQLEstateTest.cs | 80 ---- .../Tests/NHibernatePostgreSQLGridTest.cs | 79 ---- .../Tests/NHibernatePostgreSQLInventoryTest.cs | 80 ---- .../Tests/NHibernatePostgreSQLRegionTest.cs | 80 ---- .../Tests/NHibernatePostgreSQLUserTest.cs | 79 ---- .../NHibernate/Tests/NHibernateSQLiteAssetTest.cs | 82 ---- .../NHibernate/Tests/NHibernateSQLiteEstateTest.cs | 82 ---- .../NHibernate/Tests/NHibernateSQLiteGridTest.cs | 80 ---- .../Tests/NHibernateSQLiteInventoryTest.cs | 82 ---- .../NHibernate/Tests/NHibernateSQLiteRegionTest.cs | 82 ---- .../NHibernate/Tests/NHibernateSQLiteUserTest.cs | 82 ---- OpenSim/Data/NHibernate/TextureUserType.cs | 115 ----- OpenSim/Data/NHibernate/UInt16Type.cs | 103 ----- OpenSim/Data/NHibernate/UInt32Type.cs | 103 ----- OpenSim/Data/NHibernate/UInt64Type.cs | 103 ----- OpenSim/Data/NHibernate/UserFriend.cs | 72 ---- OpenSim/Data/Tests/BasicRegionTest.cs | 1 - OpenSim/Data/Tests/DataTestUtil.cs | 2 +- 88 files changed, 1 insertion(+), 7605 deletions(-) delete mode 100644 OpenSim/Data/NHibernate/ColorUserType.cs delete mode 100644 OpenSim/Data/NHibernate/EstateRegionLink.cs delete mode 100644 OpenSim/Data/NHibernate/LLQuaternionUserType.cs delete mode 100644 OpenSim/Data/NHibernate/LLUUIDUserType.cs delete mode 100644 OpenSim/Data/NHibernate/LLVector3UserType.cs delete mode 100644 OpenSim/Data/NHibernate/Migration/README.txt delete mode 100644 OpenSim/Data/NHibernate/Migration/SqliteAssets.sql delete mode 100755 OpenSim/Data/NHibernate/Migration/SqliteInventory.pl delete mode 100644 OpenSim/Data/NHibernate/NHibernateAssetData.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateEstateData.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateGridData.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateInventoryData.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateManager.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateRegionData.cs delete mode 100644 OpenSim/Data/NHibernate/NHibernateUserData.cs delete mode 100644 OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql delete mode 100644 OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml delete mode 100644 OpenSim/Data/NHibernate/SByteType.cs delete mode 100644 OpenSim/Data/NHibernate/Terrain.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs delete mode 100644 OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs delete mode 100644 OpenSim/Data/NHibernate/TextureUserType.cs delete mode 100644 OpenSim/Data/NHibernate/UInt16Type.cs delete mode 100644 OpenSim/Data/NHibernate/UInt32Type.cs delete mode 100644 OpenSim/Data/NHibernate/UInt64Type.cs delete mode 100644 OpenSim/Data/NHibernate/UserFriend.cs (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/NHibernate/ColorUserType.cs b/OpenSim/Data/NHibernate/ColorUserType.cs deleted file mode 100644 index 7ac2360..0000000 --- a/OpenSim/Data/NHibernate/ColorUserType.cs +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using System.Drawing; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class ColorUserType : IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object color1, object color2) - { - return color1.Equals(color2); - } - - public object DeepCopy(object color) - { - return color; - } - - public object Disassemble(object color) - { - return color; - } - - public int GetHashCode(object color) - { - return (color == null) ? 0 : color.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - Color color=Color.Empty; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - color = Color.FromArgb(rs.GetInt32(ord)); - } - - return color; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - Color color = (Color)obj; - ((IDataParameter)cmd.Parameters[index]).Value = color.ToArgb(); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(Color); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/EstateRegionLink.cs b/OpenSim/Data/NHibernate/EstateRegionLink.cs deleted file mode 100644 index 4b83fa5..0000000 --- a/OpenSim/Data/NHibernate/EstateRegionLink.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Text; -using OpenMetaverse; - -namespace OpenSim.Data.NHibernate -{ - public class EstateRegionLink - { - private UUID estateRegionLinkID; - public UUID EstateRegionLinkID - { - get - { - return estateRegionLinkID; - } - set - { - estateRegionLinkID = value; - } - } - - private uint estateID; - public uint EstateID - { - get - { - return estateID; - } - set - { - estateID = value; - } - } - - private UUID regionID; - public UUID RegionID - { - get - { - return regionID; - } - set - { - regionID = value; - } - } - } -} diff --git a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs deleted file mode 100644 index cf87827..0000000 --- a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; -using OpenMetaverse; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class QuaternionUserType: IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object quat1, object quat2) - { - return quat1.Equals(quat2); - } - - public object DeepCopy(object quat) - { - Quaternion q = (Quaternion)quat; - return new Quaternion(q); - } - - public object Disassemble(object quat) - { - return quat; - } - - public int GetHashCode(object quat) - { - return (quat == null) ? 0 : quat.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object quat = null; - - int x = rs.GetOrdinal(names[0]); - int y = rs.GetOrdinal(names[1]); - int z = rs.GetOrdinal(names[2]); - int w = rs.GetOrdinal(names[3]); - if (!rs.IsDBNull(x)) - { - float X = (Single)Convert.ToDouble(rs[x].ToString()); - float Y = (Single)Convert.ToDouble(rs[y].ToString()); - float Z = (Single)Convert.ToDouble(rs[z].ToString()); - float W = (Single)Convert.ToDouble(rs[w].ToString()); - quat = new Quaternion(X, Y, Z, W); - } - return quat; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - Quaternion quat = (Quaternion)obj; - ((IDataParameter)cmd.Parameters[index]).Value = quat.X; - ((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y; - ((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z; - ((IDataParameter)cmd.Parameters[index + 3]).Value = quat.W; - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(Quaternion); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { - NHibernateUtil.Single.SqlType, - NHibernateUtil.Single.SqlType, - NHibernateUtil.Single.SqlType, - NHibernateUtil.Single.SqlType - }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs deleted file mode 100644 index 8e652ff..0000000 --- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; -using OpenMetaverse; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class UUIDUserType: IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object uuid1, object uuid2) - { - return uuid1.Equals(uuid2); - } - - public object DeepCopy(object uuid) - { - return uuid; - } - - public object Disassemble(object uuid) - { - return uuid; - } - - public int GetHashCode(object uuid) - { - return (uuid == null) ? 0 : uuid.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object uuid = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - string first = (string)rs.GetString(ord); - uuid = new UUID(first); - } - - return uuid; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - UUID uuid = (UUID)obj; - ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString(); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(UUID); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.String.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/LLVector3UserType.cs b/OpenSim/Data/NHibernate/LLVector3UserType.cs deleted file mode 100644 index 9fa4603..0000000 --- a/OpenSim/Data/NHibernate/LLVector3UserType.cs +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; -using OpenMetaverse; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class Vector3UserType: IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object vector1, object vector2) - { - return vector1.Equals(vector2); - } - - public object DeepCopy(object vector) - { - return new Vector3((Vector3) vector); - } - - public object Disassemble(object vector) - { - return vector; - } - - public int GetHashCode(object vector) - { - return (vector == null) ? 0 : vector.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object vector = null; - - int x = rs.GetOrdinal(names[0]); - int y = rs.GetOrdinal(names[1]); - int z = rs.GetOrdinal(names[2]); - if (!rs.IsDBNull(x) && !rs.IsDBNull(y) && !rs.IsDBNull(z)) - { - float X = (Single)Convert.ToDouble(rs[x].ToString()); - float Y = (Single)Convert.ToDouble(rs[y].ToString()); - float Z = (Single)Convert.ToDouble(rs[z].ToString()); - vector = new Vector3(X, Y, Z); - } - return vector; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - Vector3 vector = (Vector3)obj; - ((IDataParameter)cmd.Parameters[index]).Value = vector.X; - ((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y; - ((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z; - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(Vector3); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType, NHibernateUtil.Single.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/Migration/README.txt b/OpenSim/Data/NHibernate/Migration/README.txt deleted file mode 100644 index 3776960..0000000 --- a/OpenSim/Data/NHibernate/Migration/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains migration scripts for migrating from other -database backends in OpenSim to the NHibernate version of that same -database driver. \ No newline at end of file diff --git a/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql b/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql deleted file mode 100644 index 4a7e0d1..0000000 --- a/OpenSim/Data/NHibernate/Migration/SqliteAssets.sql +++ /dev/null @@ -1,5 +0,0 @@ --- The following converts the UUID from XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --- to XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. This puts it in Guid native format --- for .NET, and the prefered format for LLUUID. - -update assets set UUID = SUBSTR(UUID,1,8) || "-" || SUBSTR(UUID,9,4) || "-" || SUBSTR(UUID,13,4) || "-" || SUBSTR(UUID,17,4) || "-" || SUBSTR(UUID,21,12) where UUID not like '%-%'; \ No newline at end of file diff --git a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl b/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl deleted file mode 100755 index c59cbce..0000000 --- a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl - -# -- CREATE TABLE inventoryitems(UUID varchar(255) primary key, -# -- assetID varchar(255), -# -- assetType integer, -# -- invType integer, -# -- parentFolderID varchar(255), -# -- avatarID varchar(255), -# -- creatorsID varchar(255), -# -- inventoryName varchar(255), -# -- inventoryDescription varchar(255), -# -- inventoryNextPermissions integer, -# -- inventoryCurrentPermissions integer, -# -- inventoryBasePermissions integer, -# -- inventoryEveryOnePermissions integer); - -# -- CREATE TABLE inventoryfolders(UUID varchar(255) primary key, -# -- name varchar(255), -# -- agentID varchar(255), -# -- parentID varchar(255), -# -- type integer, -# -- version integer); - -my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder, Owner, Creator, Name, Description, NextPermissions, CurrentPermissions, BasePermissions, EveryOnePermissions) "; -my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) "; - -open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration"; -open(WRITE,"| sqlite3 Inventory.db"); - -while(my $line = ) { - $line =~ s/([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})/$1-$2-$3-$4-$5/g; - if($line =~ s/(INSERT INTO "inventoryitems")/$items/) { - print $line; - print WRITE $line; - } - if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) { - print $line; - print WRITE $line; - } -} - -close(WRITE); -close(SQLITE); diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs deleted file mode 100644 index aaba15c..0000000 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Reflection; -using System.Collections.Generic; -using log4net; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - /// - /// A User storage interface for the DB4o database system - /// - public class NHibernateAssetData : AssetDataBase - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - override public void Dispose() { } - - public override void Initialise() - { - m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); - } - - public override void Initialise(string connect) - { - - m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateAssetData"); - manager = new NHibernateManager(connect, "AssetStore"); - - } - - override public AssetBase GetAsset(UUID uuid) - { - return (AssetBase)manager.Get(typeof(AssetBase), uuid); - } - - override public void StoreAsset(AssetBase asset) - { - AssetBase temp = (AssetBase)manager.Get(typeof(AssetBase), asset.FullID); - if (temp == null) - { - m_log.InfoFormat("[NHIBERNATE] inserting asset {0}", asset.FullID); - manager.Insert(asset); - } - else - { - m_log.InfoFormat("[NHIBERNATE] updating asset {0}", asset.FullID); - manager.Update(asset); - } - } - - // private void LogAssetLoad(AssetBase asset) - // { - // string temporary = asset.Temporary ? "Temporary" : "Stored"; - // string local = asset.Local ? "Local" : "Remote"; - - // int assetLength = (asset.Data != null) ? asset.Data.Length : 0; - - // m_log.Info("[SQLITE]: " + - // string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", - // asset.FullID, asset.Name, asset.Description, asset.Type, - // asset.InvType, temporary, local, assetLength)); - // } - - override public bool ExistsAsset(UUID uuid) - { - m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); - return (GetAsset(uuid) != null); - } - - /// - /// Returns a list of AssetMetadata objects. The list is a subset of - /// the entire data set offset by containing - /// elements. - /// - /// The number of results to discard from the total data set. - /// The number of rows the returned list should contain. - /// A list of AssetMetadata objects. - public override List FetchAssetMetadataSet(int start, int count) - { - List retList = new List(count); - return retList; - } - - public void DeleteAsset(UUID uuid) - { - - } - - public override string Name { - get { return "NHibernate"; } - } - - public override string Version { - get { return "0.1"; } - } - - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateEstateData.cs b/OpenSim/Data/NHibernate/NHibernateEstateData.cs deleted file mode 100644 index 5c5be9f..0000000 --- a/OpenSim/Data/NHibernate/NHibernateEstateData.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Reflection; -using log4net; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Region.Framework.Interfaces; -using NHibernate; -using NHibernate.Criterion; -using System.Collections; -using System; - -namespace OpenSim.Data.NHibernate -{ - /// - /// A User storage interface for the DB4o database system - /// - public class NHibernateEstateData : IEstateDataStore - { - - #region Fields - - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - public string Name - { - get { return "NHibernateEstateData"; } - } - - public string Version - { - get { return "0.1"; } - } - - #endregion - - #region Startup and shutdown. - - public void Initialise() - { - m_log.Info("[NHIBERNATE]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); - } - - public void Initialise(string connect) - { - - m_log.InfoFormat("[NHIBERNATE] Initializing " + Name + "."); - manager = new NHibernateManager(connect, "EstateStore"); - } - - public void Dispose() { } - - #endregion - - #region IEstateDataStore Members - - public EstateSettings LoadEstateSettings(UUID regionID) - { - EstateRegionLink link = LoadEstateRegionLink(regionID); - - // Ensure that estate settings exist for the link - if (link != null) - { - if (manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID) == null) - { - // Delete broken link - manager.Delete(link); - link = null; - } - } - - // If estate link does not exist create estate settings and link it to region. - if (link == null) - { - EstateSettings estateSettings = new EstateSettings(); - //estateSettings.EstateOwner = UUID.Random(); - //estateSettings.BlockDwell = false; - object identifier = manager.Insert(estateSettings); - - if (identifier == null) - { - // Saving failed. Error is logged in the manager. - return null; - } - - uint estateID = (uint)identifier; - link = new EstateRegionLink(); - link.EstateRegionLinkID = UUID.Random(); - link.RegionID = regionID; - link.EstateID = estateID; - manager.InsertWithStatefullSession(link); - } - - // Load estate settings according to the existing or created link. - return (EstateSettings)manager.GetWithStatefullSession(typeof(EstateSettings), link.EstateID); - } - - public void StoreEstateSettings(EstateSettings estateSettings) - { - // Estates are always updated when stored. - // Insert is always done via. load method as with the current API - // this is explicitly the only way to create region link. - manager.UpdateWithStatefullSession(estateSettings); - } - - #endregion - - #region Private Utility Methods - private EstateRegionLink LoadEstateRegionLink(UUID regionID) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(EstateRegionLink)); - criteria.Add(Expression.Eq("RegionID", regionID)); - IList links = criteria.List(); - - // Fail fast if more than one estate links exist - if (links.Count > 1) - { - m_log.Error("[NHIBERNATE]: Region had more than one estate linked: " + regionID); - throw new Exception("[NHIBERNATE]: Region had more than one estate linked: " + regionID); - } - - if (links.Count == 1) - { - return (EstateRegionLink)links[0]; - } - else - { - return null; - } - } - #endregion - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateGridData.cs b/OpenSim/Data/NHibernate/NHibernateGridData.cs deleted file mode 100644 index 018af62..0000000 --- a/OpenSim/Data/NHibernate/NHibernateGridData.cs +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using log4net; -using NHibernate; -using NHibernate.Criterion; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - - /// - /// A GridData Interface to the NHibernate database - /// - public class NHibernateGridData : GridDataBase - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - public override void Initialise() - { - m_log.Info("[NHibernateGridData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException(Name); - } - - public override void Initialise(string connect) - { - m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateGridData"); - manager = new NHibernateManager(connect, "GridStore"); - } - - /*********************************************************************** - * - * Public Interface Functions - * - **********************************************************************/ - - public override void Dispose() { } - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - public override string Name - { - get { return "NHibernate Grid Data Interface"; } - } - - /// - /// The plugins version - /// - /// A string containing the plugin version - public override string Version - { - get - { - Module module = GetType().Module; - Version dllVersion = module.Assembly.GetName().Version; - - return string.Format("{0}.{1}.{2}.{3}", - dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision); - } - } - - public override bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey) - { - bool throwHissyFit = false; // Should be true by 1.0 - - if (throwHissyFit) - throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); - - RegionProfileData data = GetProfileByUUID(UUID); - - return (regionHandle == data.regionHandle && simrecvkey == data.regionSecret); - } - - public override ReservationData GetReservationAtPoint(uint x, uint y) - { - throw new NotImplementedException(); - } - - public override DataResponse StoreProfile(RegionProfileData profile) - { - if (manager.Get(typeof(RegionProfileData), profile.Uuid) == null) - { - manager.Insert(profile); - return DataResponse.RESPONSE_OK; - } - else - { - manager.Update(profile); - return DataResponse.RESPONSE_OK; - } - } - - public override DataResponse DeleteProfile(string uuid) - { - RegionProfileData regionProfileData = (RegionProfileData)manager.Get(typeof(RegionProfileData), new UUID(uuid)); - if (regionProfileData != null) - { - manager.Delete(regionProfileData); - return DataResponse.RESPONSE_OK; - } - return DataResponse.RESPONSE_ERROR; - } - - public override RegionProfileData GetProfileByUUID(UUID UUID) - { - return (RegionProfileData)manager.Get(typeof(RegionProfileData), UUID); - } - - public override RegionProfileData GetProfileByHandle(ulong regionHandle) - { - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData)); - criteria.Add(Expression.Eq("RegionHandle", regionHandle)); - - IList regions = criteria.List(); - - if (regions.Count == 1) - { - return (RegionProfileData)regions[0]; - } - else - { - return null; - } - } - } - - public override RegionProfileData GetProfileByString(string regionName) - { - - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData)); - criteria.Add(Expression.Eq("RegionName", regionName)); - - IList regions = criteria.List(); - - if (regions.Count == 1) - { - return (RegionProfileData)regions[0]; - } - else - { - return null; - } - } - - } - - public override RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax) - { - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData)); - criteria.Add(Expression.Ge("RegionLocX", Xmin)); - criteria.Add(Expression.Ge("RegionLocY", Ymin)); - criteria.Add(Expression.Le("RegionLocX", Xmax)); - criteria.Add(Expression.Le("RegionLocY", Ymax)); - - IList regions = criteria.List(); - RegionProfileData[] regionArray = new RegionProfileData[regions.Count]; - - for (int i=0;i GetRegionsByName(string namePrefix, uint maxNum) - { - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(RegionProfileData)); - criteria.SetMaxResults((int)maxNum); - - criteria.Add(Expression.Like("RegionName", namePrefix, MatchMode.Start)); - - IList regions = criteria.List(); - List regionList = new List(); - - foreach (RegionProfileData regionProfileData in regions) - { - regionList.Add(regionProfileData); - } - - return regionList; - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs deleted file mode 100644 index 130be7e..0000000 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Reflection; -using log4net; -using NHibernate; -using NHibernate.Criterion; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - public class NHibernateInventoryData: IInventoryDataPlugin - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - public string Name - { - get { return "NHibernate Inventory Data Interface"; } - } - - /// - /// The plugins version - /// - /// A string containing the plugin version - public string Version - { - get - { - Module module = GetType().Module; - // string dllName = module.Assembly.ManifestModule.Name; - Version dllVersion = module.Assembly.GetName().Version; - - - return - string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, - dllVersion.Revision); - } - } - - public void Initialise() - { - m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException (Name); - } - - /// - /// Initialises the interface - /// - public void Initialise(string connect) - { - m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateInventoryData"); - manager = new NHibernateManager(connect, "InventoryStore"); - } - - /// - /// Closes the interface - /// - public void Dispose() - { - } - - /***************************************************************** - * - * Basic CRUD operations on Data - * - ****************************************************************/ - - // READ - - /// - /// Returns an inventory item by its UUID - /// - /// The UUID of the item to be returned - /// A class containing item information - public InventoryItemBase getInventoryItem(UUID item) - { - try - { - m_log.InfoFormat("[NHIBERNATE] getInventoryItem {0}", item); - return (InventoryItemBase)manager.Get(typeof(InventoryItemBase), item); - } - catch - { - m_log.ErrorFormat("Couldn't find inventory item: {0}", item); - return null; - } - } - - /// - /// Creates a new inventory item based on item - /// - /// The item to be created - public void addInventoryItem(InventoryItemBase item) - { - if (!ExistsItem(item.ID)) - { - manager.Insert(item); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists, updating instead", item.ID); - updateInventoryItem(item); - } - } - - /// - /// Updates an inventory item with item (updates based on ID) - /// - /// The updated item - public void updateInventoryItem(InventoryItemBase item) - { - if (ExistsItem(item.ID)) - { - manager.Update(item); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Item {0} that already exists", item.ID); - } - } - - /// - /// - /// - /// - public void deleteInventoryItem(UUID itemID) - { - InventoryItemBase item = (InventoryItemBase)manager.Get(typeof(InventoryItemBase), itemID); - if (item != null) - { - manager.Delete(item); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryItemBase {0}", itemID); - } - - } - - public InventoryItemBase queryInventoryItem(UUID itemID) - { - return null; - } - - public InventoryFolderBase queryInventoryFolder(UUID folderID) - { - return null; - } - - /// - /// Returns an inventory folder by its UUID - /// - /// The UUID of the folder to be returned - /// A class containing folder information - public InventoryFolderBase getInventoryFolder(UUID folder) - { - try - { - return (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folder); - } - catch - { - m_log.ErrorFormat("[NHIBERNATE] Couldn't find inventory item: {0}", folder); - return null; - } - } - - /// - /// Creates a new inventory folder based on folder - /// - /// The folder to be created - public void addInventoryFolder(InventoryFolderBase folder) - { - if (!ExistsFolder(folder.ID)) - { - manager.Insert(folder); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists, updating instead", folder.ID); - updateInventoryFolder(folder); - } - } - - /// - /// Updates an inventory folder with folder (updates based on ID) - /// - /// The updated folder - public void updateInventoryFolder(InventoryFolderBase folder) - { - if (ExistsFolder(folder.ID)) - { - manager.Update(folder); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add Inventory Folder {0} that already exists", folder.ID); - } - } - - /// - /// - /// - /// - public void deleteInventoryFolder(UUID folderID) - { - InventoryFolderBase item = (InventoryFolderBase)manager.Get(typeof(InventoryFolderBase), folderID); - if (item != null) - { - manager.Delete(item); - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Error deleting InventoryFolderBase {0}", folderID); - } - manager.Delete(folderID); - } - - // useful private methods - private bool ExistsItem(UUID uuid) - { - return (getInventoryItem(uuid) != null) ? true : false; - } - - private bool ExistsFolder(UUID uuid) - { - return (getInventoryFolder(uuid) != null) ? true : false; - } - - public void Shutdown() - { - // TODO: DataSet commit - } - - // Move seems to be just update - - public void moveInventoryFolder(InventoryFolderBase folder) - { - updateInventoryFolder(folder); - } - - public void moveInventoryItem(InventoryItemBase item) - { - updateInventoryItem(item); - } - - - - /// - /// Returns a list of inventory items contained within the specified folder - /// - /// The UUID of the target folder - /// A List of InventoryItemBase items - public List getInventoryInFolder(UUID folderID) - { - // try { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryItemBase)); - criteria.Add(Expression.Eq("Folder", folderID)); - List list = new List(); - foreach (InventoryItemBase item in criteria.List()) - { - list.Add(item); - } - return list; - // } - // catch - // { - // return new List(); - // } - } - - public List getUserRootFolders(UUID user) - { - return new List(); - } - - // see InventoryItemBase.getUserRootFolder - public InventoryFolderBase getUserRootFolder(UUID user) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase)); - criteria.Add(Expression.Eq("ParentID", UUID.Zero)); - criteria.Add(Expression.Eq("Owner", user)); - foreach (InventoryFolderBase folder in criteria.List()) - { - return folder; - } - m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user); - return null; - } - - /// - /// Append a list of all the child folders of a parent folder - /// - /// list where folders will be appended - /// ID of parent - private void getInventoryFolders(ref List folders, UUID parentID) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryFolderBase)); - criteria.Add(Expression.Eq("ParentID", parentID)); - foreach (InventoryFolderBase item in criteria.List()) - { - folders.Add(item); - } - } - - /// - /// Returns a list of inventory folders contained in the folder 'parentID' - /// - /// The folder to get subfolders for - /// A list of inventory folders - public List getInventoryFolders(UUID parentID) - { - List folders = new List(); - getInventoryFolders(ref folders, parentID); - return folders; - } - - // See IInventoryDataPlugin - public List getFolderHierarchy(UUID parentID) - { - if (parentID == UUID.Zero) - { - // Zero UUID is not a real parent folder. - return new List(); - } - - List folders = new List(); - - getInventoryFolders(ref folders, parentID); - - for (int i = 0; i < folders.Count; i++) - getInventoryFolders(ref folders, folders[i].ID); - - return folders; - } - - public List fetchActiveGestures (UUID avatarID) - { - return null; - } - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs deleted file mode 100644 index 2e7081e..0000000 --- a/OpenSim/Data/NHibernate/NHibernateManager.cs +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data.Common; -using System.Reflection; -using log4net; -using NHibernate; -using NHibernate.Cfg; -using NHibernate.Tool.hbm2ddl; -using OpenMetaverse; -using Environment=NHibernate.Cfg.Environment; - -namespace OpenSim.Data.NHibernate -{ - public class NHibernateManager - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private string dialect; - private Configuration configuration; - private ISessionFactory sessionFactory; - - #region Initialization - - /// - /// Initiate NHibernate Manager - /// - /// NHibernate dialect, driver and connection string separated by ';' - /// Name of the store - public NHibernateManager(string connect, string store) - { - ParseConnectionString(connect); - - //To create sql file uncomment code below and write the name of the file - //SchemaExport exp = new SchemaExport(cfg); - //exp.SetOutputFile("nameofthefile.sql"); - //exp.Create(false, true); - - Assembly assembly = GetType().Assembly; - - sessionFactory = configuration.BuildSessionFactory(); - RunMigration(dialect, assembly, store); - } - - /// - /// Initiate NHibernate Manager with spesific assembly - /// - /// NHibernate dialect, driver and connection string separated by ';' - /// Name of the store - /// Outside assembly to be included - public NHibernateManager(string connect, string store, Assembly assembly) - { - ParseConnectionString(connect); - - configuration.AddAssembly(assembly); - sessionFactory = configuration.BuildSessionFactory(); - RunMigration(dialect, assembly, store); - } - - /// - /// Parses the connection string and creates the NHibernate configuration - /// - /// NHibernate dialect, driver and connection string separated by ';' - private void ParseConnectionString(string connect) - { - // Split out the dialect, driver, and connect string - char[] split = { ';' }; - string[] parts = connect.Split(split, 3); - if (parts.Length != 3) - { - // TODO: make this a real exception type - throw new Exception("Malformed Inventory connection string '" + connect + "'"); - } - - dialect = parts[0]; - - // NHibernate setup - configuration = new Configuration(); - configuration.SetProperty(Environment.ConnectionProvider, - "NHibernate.Connection.DriverConnectionProvider"); - configuration.SetProperty(Environment.Dialect, - "NHibernate.Dialect." + dialect); - configuration.SetProperty(Environment.ConnectionDriver, - "NHibernate.Driver." + parts[1]); - configuration.SetProperty(Environment.ConnectionString, parts[2]); - configuration.AddAssembly("OpenSim.Data.NHibernate"); - } - - /// - /// Runs migration for the the store in assembly - /// - /// Dialect in use - /// Assembly where migration files exist - /// Name of the store in use - private void RunMigration(string dialect, Assembly assembly, string store) - { - // Migration subtype is the folder name under which migrations are stored. For mysql this folder is - // MySQLDialect instead of MySQL5Dialect which is the dialect currently in use. To avoid renaming - // this folder each time the mysql version changes creating simple mapping: - String migrationSubType = dialect; - if (dialect.StartsWith("MySQL")) - { - migrationSubType = "MySQLDialect"; - } - - Migration migration = new Migration((DbConnection)sessionFactory.ConnectionProvider.GetConnection(), assembly, migrationSubType, store); - migration.Update(); - } - - #endregion - - /// - /// Gets object of given type from database with given id. - /// Uses stateless session for efficiency. - /// - /// Type of the object. - /// Id of the object. - /// The object or null if object was not found. - public object Get(Type type, Object id) - { - using (IStatelessSession session = sessionFactory.OpenStatelessSession()) - { - object obj = null; - try - { - obj = session.Get(type.FullName, id); - } - catch (Exception e) - { - m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id); - } - return obj; - } - } - - /// - /// Gets object of given type from database with given id. - /// Use this method for objects containing collections. For flat objects stateless mode is more efficient. - /// - /// Type of the object. - /// Id of the object. - /// The object or null if object was not found. - public object GetWithStatefullSession(Type type, Object id) - { - using (ISession session = sessionFactory.OpenSession()) - { - object obj = null; - try - { - obj = session.Get(type.FullName, id); - } - catch (Exception e) - { - m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id); - } - return obj; - } - - } - - /// - /// Inserts given object to database. - /// Uses stateless session for efficiency. - /// - /// Object to be insterted. - /// Identifier of the object. Useful for situations when NHibernate generates the identifier. - public object Insert(object obj) - { - try - { - using (IStatelessSession session = sessionFactory.OpenStatelessSession()) - { - using (ITransaction transaction=session.BeginTransaction()) - { - Object identifier=session.Insert(obj); - transaction.Commit(); - return identifier; - } - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue inserting object ", e); - return null; - } - } - - /// - /// Inserts given object to database. - /// Use this method for objects containing collections. For flat objects stateless mode is more efficient. - /// - /// Object to be insterted. - /// Identifier of the object. Useful for situations when NHibernate generates the identifier. - public object InsertWithStatefullSession(object obj) - { - try - { - using (ISession session = sessionFactory.OpenSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - Object identifier = session.Save(obj); - transaction.Commit(); - return identifier; - } - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue inserting object ", e); - return null; - } - } - - /// - /// Updates given object to database. - /// Uses stateless session for efficiency. - /// - /// Object to be updated. - /// True if operation was succesful. - public bool Update(object obj) - { - try - { - using (IStatelessSession session = sessionFactory.OpenStatelessSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - session.Update(obj); - transaction.Commit(); - return true; - } - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue updating object ", e); - return false; - } - } - - /// - /// Updates given object to database. - /// Use this method for objects containing collections. For flat objects stateless mode is more efficient. - /// - /// Object to be updated. - /// True if operation was succesful. - public bool UpdateWithStatefullSession(object obj) - { - try - { - using (ISession session = sessionFactory.OpenSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - session.Update(obj); - transaction.Commit(); - return true; - } - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue updating object ", e); - return false; - } - } - - /// - /// Deletes given object from database. - /// - /// Object to be deleted. - /// True if operation was succesful. - public bool Delete(object obj) - { - try - { - using (IStatelessSession session = sessionFactory.OpenStatelessSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - session.Delete(obj); - transaction.Commit(); - return true; - } - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue deleting object ", e); - return false; - } - } - - /// - /// Returns statefull session which can be used to execute custom nhibernate or sql queries. - /// - /// Statefull session - public ISession GetSession() - { - return sessionFactory.OpenSession(); - } - - /// - /// Drops the database schema. This exist for unit tests. It should not be invoked from other than test teardown. - /// - public void DropSchema() - { - SchemaExport export = new SchemaExport(this.configuration); - export.Drop(true, true); - - using (ISession session = sessionFactory.OpenSession()) - { - ISQLQuery sqlQuery = session.CreateSQLQuery("drop table migrations"); - sqlQuery.ExecuteUpdate(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs deleted file mode 100644 index f19fda1..0000000 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Reflection; -using log4net; -using NHibernate; -using NHibernate.Criterion; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Data.NHibernate -{ - /// - /// A RegionData Interface to the NHibernate database - /// - public class NHibernateRegionData : IRegionDataStore - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - public void Initialise(string connect) - { - m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateRegionData"); - manager = new NHibernateManager(connect, "RegionStore"); - } - - /*********************************************************************** - * - * Public Interface Functions - * - **********************************************************************/ - - public void Dispose() {} - - public void StoreRegionSettings(RegionSettings rs) - { - RegionSettings oldRegionSettings = (RegionSettings)manager.Get(typeof(RegionSettings), rs.RegionUUID); - if (oldRegionSettings != null) - { - manager.Update(rs); - } - else - { - manager.Insert(rs); - } - } - - public RegionSettings LoadRegionSettings(UUID regionUUID) - { - RegionSettings regionSettings = (RegionSettings) manager.Get(typeof(RegionSettings), regionUUID); - - if (regionSettings == null) - { - regionSettings = new RegionSettings(); - regionSettings.RegionUUID = regionUUID; - manager.Insert(regionSettings); - } - - regionSettings.OnSave += StoreRegionSettings; - - return regionSettings; - } - - // This looks inefficient, but it turns out that it isn't - // based on trial runs with nhibernate 1.2 - private void SaveOrUpdate(SceneObjectPart p) - { - try - { - SceneObjectPart old = (SceneObjectPart)manager.Get(typeof(SceneObjectPart), p.UUID); - if (old != null) - { - m_log.InfoFormat("[NHIBERNATE] updating object {0}", p.UUID); - manager.Update(p); - } - else - { - m_log.InfoFormat("[NHIBERNATE] saving object {0}", p.UUID); - manager.Insert(p); - } - - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue saving part", e); - } - } - - private void SaveOrUpdate(Terrain t) - { - try - { - - Terrain old = (Terrain)manager.Get(typeof(Terrain), t.RegionID); - if (old != null) - { - m_log.InfoFormat("[NHIBERNATE] updating terrain {0}", t.RegionID); - manager.Update(t); - } - else - { - m_log.InfoFormat("[NHIBERNATE] saving terrain {0}", t.RegionID); - manager.Insert(t); - } - - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] issue saving terrain", e); - } - } - - - /// - /// Adds an object into region storage - /// - /// the object - /// the region UUID - public void StoreObject(SceneObjectGroup obj, UUID regionUUID) - { - uint flags = obj.RootPart.GetEffectiveObjectFlags(); - - // Eligibility check - if ((flags & (uint)PrimFlags.Temporary) != 0) - return; - if ((flags & (uint)PrimFlags.TemporaryOnRez) != 0) - return; - - try - { - foreach (SceneObjectPart part in obj.Children.Values) - { - m_log.InfoFormat("Storing part {0}", part.UUID); - SaveOrUpdate(part); - } - } - catch (Exception e) - { - m_log.Error("Can't save: ", e); - } - } - - private SceneObjectGroup LoadObject(UUID uuid, UUID region) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart)); - criteria.Add(Expression.Eq("RegionID", region)); - criteria.Add(Expression.Eq("ParentUUID", uuid)); - criteria.AddOrder(Order.Asc("ParentID")); - - IList parts = criteria.List(); - - SceneObjectGroup group = null; - - // Find the root part - for (int i = 0; i < parts.Count; i++) - { - if (parts[i].UUID == uuid) - { - group = new SceneObjectGroup(parts[i]); - break; - } - } - - // Add the children parts - if (group != null) - { - for (int i = 0; i < parts.Count; i++) - { - if (parts[i].UUID != uuid) - group.AddPart(parts[i]); - } - } - else - { - m_log.Error("[NHIBERNATE]: LoadObject() Attempted to load a SceneObjectGroup with no root SceneObjectPart "); - } - - return group; - } - - /// - /// Removes an object from region storage - /// - /// the object - /// the region UUID - public void RemoveObject(UUID obj, UUID regionUUID) - { - SceneObjectGroup g = LoadObject(obj, regionUUID); - foreach (SceneObjectPart p in g.Children.Values) - { - manager.Delete(p); - } - - // m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID); - - } - - /// - /// Load persisted objects from region storage. - /// - /// The region UUID - /// List of loaded groups - public List LoadObjects(UUID regionUUID) - { - Dictionary SOG = new Dictionary(); - List ret = new List(); - - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(SceneObjectPart)); - criteria.Add(Expression.Eq("RegionID", regionUUID)); - criteria.AddOrder(Order.Asc("ParentID")); - criteria.AddOrder(Order.Asc("LinkNum")); - foreach (SceneObjectPart p in criteria.List()) - { - // root part - if (p.UUID == p.ParentUUID) - { - SceneObjectGroup group = new SceneObjectGroup(p); - SOG.Add(p.ParentUUID, group); - } - else - { - SOG[p.ParentUUID].AddPart(p); - } - // get the inventory - - ICriteria InvCriteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem)); - InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID)); - IList inventory = new List(); - foreach (TaskInventoryItem i in InvCriteria.List()) - { - inventory.Add(i); - } - - if (inventory.Count > 0) - p.Inventory.RestoreInventoryItems(inventory); - } - foreach (SceneObjectGroup g in SOG.Values) - { - ret.Add(g); - } - - return ret; - } - - /// - /// Store a terrain revision in region storage - /// - /// terrain heightfield - /// region UUID - public void StoreTerrain(double[,] ter, UUID regionID) - { - lock (this) { - Terrain t = new Terrain(regionID, ter); - SaveOrUpdate(t); - } - } - - /// - /// Load the latest terrain revision from region storage - /// - /// the region UUID - /// Heightfield data - public double[,] LoadTerrain(UUID regionID) - { - Terrain t = (Terrain)manager.Get(typeof(Terrain), regionID); - if (t != null) - { - return t.Doubles; - } - - m_log.Info("No terrain yet"); - return null; - } - - /// - /// - /// - /// - public void RemoveLandObject(UUID globalID) - { - - } - - /// - /// - /// - /// - public void StoreLandObject(ILandObject parcel) - { - - } - - /// - /// - /// - /// - /// - public List LoadLandObjects(UUID regionUUID) - { - List landDataForRegion = new List(); - - return landDataForRegion; - } - - - /// - /// See - /// - public void Shutdown() - { - //session.Flush(); - } - - /// - /// Load a region banlist - /// - /// the region UUID - /// The banlist - public List LoadRegionBanList(UUID regionUUID) - { - List regionbanlist = new List(); - - return regionbanlist; - } - - /// - /// Add en entry into region banlist - /// - /// - public void AddToRegionBanlist(EstateBan item) - { - - } - - /// - /// remove an entry from the region banlist - /// - /// - public void RemoveFromRegionBanlist(EstateBan item) - { - - } - - /// - /// - /// - /// - /// -// private static Array serializeTerrain(double[,] val) -// { -// MemoryStream str = new MemoryStream(65536*sizeof (double)); -// BinaryWriter bw = new BinaryWriter(str); -// -// // TODO: COMPATIBILITY - Add byte-order conversions -// for (int x = 0; x < (int)Constants.RegionSize; x++) -// for (int y = 0; y < (int)Constants.RegionSize; y++) -// bw.Write(val[x, y]); -// -// return str.ToArray(); -// } - - /// - /// see IRegionDatastore - /// - /// - /// - public void StorePrimInventory(UUID primID, ICollection items) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(TaskInventoryItem)); - criteria.Add(Expression.Eq("ParentPartID", primID)); - try - { - foreach (TaskInventoryItem i in criteria.List()) - { - manager.Delete(i); - } - - foreach (TaskInventoryItem i in items) - { - manager.Insert(i); - - } - } - catch (Exception e) - { - m_log.Error("[NHIBERNATE] StoreInvetory", e); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs deleted file mode 100644 index 1b0c4c9..0000000 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System.Collections.Generic; -using System.Reflection; -using log4net; -using NHibernate; -using NHibernate.Criterion; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - /// - /// A User storage interface for the DB4o database system - /// - public class NHibernateUserData : UserDataBase - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private NHibernateManager manager; - public NHibernateManager Manager - { - get - { - return manager; - } - } - - public override void Initialise() - { - m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!"); - throw new PluginNotInitialisedException (Name); - } - - public override void Initialise(string connect) - { - m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateUserData"); - manager = new NHibernateManager(connect, "UserStore"); - } - - private bool ExistsUser(UUID uuid) - { - UserProfileData user = null; - - m_log.InfoFormat("[NHIBERNATE] ExistsUser; {0}", uuid); - user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid); - - if (user == null) - { - m_log.InfoFormat("[NHIBERNATE] User with given UUID does not exist {0} ", uuid); - return false; - } - - return true; - - } - - override public UserProfileData GetUserByUUID(UUID uuid) - { - UserProfileData user; - m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid); - - user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid); - if (user != null) - { - UserAgentData agent = GetAgentByUUID(uuid); - if (agent != null) - { - user.CurrentAgent = agent; - } - } - - return user; - } - - override public void AddNewUserProfile(UserProfileData profile) - { - if (profile.ID == UUID.Zero) - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} with zero UUID, throwintg exception as this is programming error ", profile.FirstName, profile.SurName); - return; - } - - if (!ExistsUser(profile.ID)) - { - m_log.InfoFormat("[NHIBERNATE] AddNewUserProfile {0}", profile.ID); - manager.Insert(profile); - // Agent should not be saved according to BasicUserTest.T015_UserPersistency() - // SetAgentData(profile.ID, profile.CurrentAgent); - - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add User {0} {1} that already exists, updating instead", profile.FirstName, profile.SurName); - UpdateUserProfile(profile); - } - } - - /* - private void SetAgentData(UUID uuid, UserAgentData agent) - { - UserAgentData old = (UserAgentData)manager.Load(typeof(UserAgentData), uuid); - if (old != null) - { - m_log.InfoFormat("[NHIBERNATE] SetAgentData deleting old: {0} ",uuid); - manager.Delete(old); - } - if (agent != null) - { - m_log.InfoFormat("[NHIBERNATE] SetAgentData: {0} ", agent.ProfileID); - manager.Save(agent); - } - } - */ - - override public bool UpdateUserProfile(UserProfileData profile) - { - if (ExistsUser(profile.ID)) - { - manager.Update(profile); - // Agent should not be saved according to BasicUserTest.T015_UserPersistency() - // SetAgentData(profile.ID, profile.CurrentAgent); - return true; - } - else - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to update User {0} {1} that doesn't exist, updating instead", profile.FirstName, profile.SurName); - AddNewUserProfile(profile); - return true; - } - } - - override public void AddNewUserAgent(UserAgentData agent) - { - if (agent.ProfileID == UUID.Zero) - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero user id. Agent session id: {0}", agent.SessionID); - return; - } - - if (agent.SessionID == UUID.Zero) - { - m_log.ErrorFormat("[NHIBERNATE] Attempted to add new user agent with zero session id. User profile id: {0}", agent.SessionID); - return; - } - - - UserAgentData old = (UserAgentData)manager.Get(typeof(UserAgentData), agent.ProfileID); - if (old != null) - { - manager.Delete(old); - } - - manager.Insert(agent); - - } - - public void UpdateUserAgent(UserAgentData agent) - { - m_log.InfoFormat("[NHIBERNATE] UpdateUserAgent: {0} ", agent.ProfileID); - manager.Update(agent); - } - - override public UserAgentData GetAgentByUUID(UUID uuid) - { - m_log.InfoFormat("[NHIBERNATE] GetAgentByUUID: {0} ", uuid); - return (UserAgentData)manager.Get(typeof(UserAgentData), uuid); - } - - override public UserProfileData GetUserByName(string fname, string lname) - { - m_log.InfoFormat("[NHIBERNATE] GetUserByName: {0} {1} ", fname, lname); - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData)); - criteria.Add(Expression.Eq("FirstName", fname)); - criteria.Add(Expression.Eq("SurName", lname)); - foreach (UserProfileData profile in criteria.List()) - { - profile.CurrentAgent = GetAgentByUUID(profile.ID); - return profile; - } - return null; - } - - override public UserAgentData GetAgentByName(string fname, string lname) - { - return GetUserByName(fname, lname).CurrentAgent; - } - - override public UserAgentData GetAgentByName(string name) - { - return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); - } - - override public List GeneratePickerResults(UUID queryID, string query) - { - List results = new List(); - string[] querysplit; - querysplit = query.Split(' '); - - if (querysplit.Length == 2) - { - ICriteria criteria = manager.GetSession().CreateCriteria(typeof(UserProfileData)); - criteria.Add(Expression.Like("FirstName", querysplit[0])); - criteria.Add(Expression.Like("SurName", querysplit[1])); - foreach (UserProfileData profile in criteria.List()) - { - AvatarPickerAvatar user = new AvatarPickerAvatar(); - user.AvatarID = profile.ID; - user.firstName = profile.FirstName; - user.lastName = profile.SurName; - results.Add(user); - } - } - return results; - } - - // TODO: actually implement these - public override void StoreWebLoginKey(UUID agentID, UUID webLoginKey) - { - UserProfileData user=GetUserByUUID(agentID); - user.WebLoginKey = webLoginKey; - UpdateUserProfile(user); - return; - } - - public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms) - { - if (!FriendRelationExists(ownerId,friendId)) - { - manager.Insert(new UserFriend(UUID.Random(), ownerId, friendId, perms)); - } - if (!FriendRelationExists(friendId, ownerId)) - { - manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms)); - } - return; - } - - private bool FriendRelationExists(UUID ownerId, UUID friendId) - { - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(UserFriend)); - criteria.Add(Expression.Eq("OwnerID", ownerId)); - criteria.Add(Expression.Eq("FriendID", friendId)); - return criteria.List().Count > 0; - } - } - - public override void RemoveUserFriend(UUID ownerId, UUID friendId) - { - using (ISession session = manager.GetSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - - { - ICriteria criteria = session.CreateCriteria(typeof(UserFriend)); - criteria.Add(Expression.Eq("OwnerID", ownerId)); - criteria.Add(Expression.Eq("FriendID", friendId)); - - foreach (UserFriend userFriend in criteria.List()) - { - session.Delete(userFriend); - } - } - - { - ICriteria criteria = session.CreateCriteria(typeof(UserFriend)); - criteria.Add(Expression.Eq("OwnerID", friendId)); - criteria.Add(Expression.Eq("FriendID", ownerId)); - - foreach (UserFriend userFriend in criteria.List()) - { - session.Delete(userFriend); - } - } - - transaction.Commit(); - } - } - return; - } - - - public override void UpdateUserFriendPerms(UUID ownerId, UUID friendId, uint perms) - { - using (ISession session = manager.GetSession()) - { - using (ITransaction transaction = session.BeginTransaction()) - { - { - ICriteria criteria = session.CreateCriteria(typeof(UserFriend)); - criteria.Add(Expression.Eq("OwnerID", ownerId)); - criteria.Add(Expression.Eq("FriendID", friendId)); - - foreach (UserFriend userFriend in criteria.List()) - { - userFriend.FriendPermissions = perms; - session.Update(userFriend); - } - } - transaction.Commit(); - } - } - return; - } - - public override List GetUserFriendList(UUID ownerId) - { - List friendList=new List(); - Dictionary friendListItemDictionary = new Dictionary(); - - using (ISession session = manager.GetSession()) - { - ICriteria criteria = session.CreateCriteria(typeof(UserFriend)); - criteria.Add(Expression.Or( - Expression.Eq("OwnerID", ownerId), - Expression.Eq("FriendID", ownerId) - )); - - foreach (UserFriend userFriend in criteria.List()) - { - if (userFriend.OwnerID == ownerId) - { - FriendListItem friendListItem = new FriendListItem(); - friendListItem.FriendListOwner = userFriend.OwnerID; - friendListItem.Friend = userFriend.FriendID; - friendListItem.FriendPerms = userFriend.FriendPermissions; - friendListItemDictionary.Add(userFriend.FriendID, friendListItem); - friendList.Add(friendListItem); - } - } - - // Reading permissions to other direction - foreach (UserFriend userFriend in criteria.List()) - { - if (userFriend.FriendID == ownerId) - { - //Ignore if there is no reverse relation existing. - //if (friendListItemDictionary.ContainsKey(userFriend.OwnerID)) - { - FriendListItem friendListItem = friendListItemDictionary[userFriend.OwnerID]; - friendListItem.FriendListOwnerPerms = userFriend.FriendPermissions; - } - } - } - - } - - return friendList; - } - - - public override Dictionary GetFriendRegionInfos (List friendsIds) - { - Dictionary friendRegionInfos=new Dictionary(); - - foreach (UUID friendId in friendsIds) - { - UserAgentData agent=GetAgentByUUID(friendId); - if (agent != null) - { - FriendRegionInfo fri = new FriendRegionInfo(); - fri.isOnline = agent.AgentOnline; - fri.regionHandle = agent.Handle; - - friendRegionInfos[friendId] = fri; - } - } - - return friendRegionInfos; - } - - public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return true; } - public override bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return true; } - - /// Appearance - /// TODO: stubs for now to get us to a compiling state gently - public override AvatarAppearance GetUserAppearance(UUID user) - { - return (AvatarAppearance)manager.Get(typeof(AvatarAppearance), user); - } - - private bool ExistsAppearance(UUID uuid) - { - AvatarAppearance appearance = (AvatarAppearance)manager.Get(typeof(AvatarAppearance), uuid); - if (appearance == null) - { - return false; - } - - return true; - } - - - public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance) - { - if (appearance == null) - return; - - appearance.Owner = user; - - bool exists = ExistsAppearance(user); - if (exists) - { - manager.Update(appearance); - } - else - { - manager.Insert(appearance); - } - } - - public override void ResetAttachments(UUID userID) - { - } - - public override void LogoutUsers(UUID regionID) - { - } - - public override string Name { - get { return "NHibernate"; } - } - - public override string Version { - get { return "0.1"; } - } - - public override void Dispose() - { - - } - } -} diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml deleted file mode 100644 index cb8b36d..0000000 --- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml b/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml deleted file mode 100644 index fd66910..0000000 --- a/OpenSim/Data/NHibernate/Resources/EstateRegionLink.hbm.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml b/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml deleted file mode 100644 index d300b93..0000000 --- a/OpenSim/Data/NHibernate/Resources/EstateSettings.hbm.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml deleted file mode 100644 index c5f0115..0000000 --- a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml deleted file mode 100644 index ea6032a..0000000 --- a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt b/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt deleted file mode 100644 index 1c89516..0000000 --- a/OpenSim/Data/NHibernate/Resources/MigrationSyntaxDifferences.txt +++ /dev/null @@ -1,14 +0,0 @@ -?This file describes the differences in schema creation and migration scripts. - -MySQL is used as reference script against which differences are listed. - -Generally MySQL create table options should be removed for other databases. - -_PostgreSQL_ -* DOUBLE->DOUBLE PRECISION -* BIT->BOOLEAN - -_MsSql_ -* VARCHAR->NVARCHAR -* Remove DEFAULT-keywords -* DOUBLE->REAL diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql deleted file mode 100644 index deee78b..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_AssetStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -create table Assets ( - ID NVARCHAR(36) not null, - Type SMALLINT null, - Name NVARCHAR(64) null, - Description NVARCHAR(64) null, - Local BIT null, - Temporary BIT null, - Data VARBINARY(max) null, - primary key (ID) -) diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql deleted file mode 100644 index dd579f9..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_EstateStore.sql +++ /dev/null @@ -1,72 +0,0 @@ -CREATE TABLE EstateSettings ( - EstateID INT NOT NULL, - ParentEstateID INT NULL, - EstateOwnerID NVARCHAR(36) NULL, - Name NVARCHAR(64) NULL, - RedirectGridX INT NULL, - RedirectGridY INT NULL, - BillableFactor REAL NULL, - PricePerMeter INT NULL, - SunPosition FLOAT NULL, - - UseGlobalTime BIT NULL, - FixedSun BIT NULL, - AllowVoice BIT NULL, - AllowDirectTeleport BIT NULL, - ResetHomeOnTeleport BIT NULL, - PublicAccess BIT NULL, - DenyAnonymous BIT NULL, - DenyIdentified BIT NULL, - DenyTransacted BIT NULL, - DenyMinors BIT NULL, - BlockDwell BIT NULL, - EstateSkipScripts BIT NULL, - TaxFree BIT NULL, - AbuseEmailToEstateOwner BIT NULL, - - AbuseEmail NVARCHAR(255) NULL, - - PRIMARY KEY (EstateID) -); - -CREATE TABLE EstateRegionLink ( - EstateRegionLinkID NVARCHAR(36) NOT NULL, - EstateID INT NULL, - RegionID NVARCHAR(36) NULL, - PRIMARY KEY (EstateRegionLinkID) -); - -CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID); -CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID); - - -CREATE TABLE EstateManagers ( - EstateID INT NOT NULL, - ManagerID NVARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateUsers ( - EstateID INT NOT NULL, - UserID NVARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateGroups ( - EstateID INT NOT NULL, - GroupID NVARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateBans ( - EstateID INT NOT NULL, - ArrayIndex INT NOT NULL, - BannedUserID NVARCHAR(36) NOT NULL, - BannedHostAddress NVARCHAR(16) NOT NULL, - BannedHostIPMask NVARCHAR(16) NOT NULL, - BannedHostNameMask NVARCHAR(16) NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); \ No newline at end of file diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql deleted file mode 100644 index e4ad525..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_GridStore.sql +++ /dev/null @@ -1,35 +0,0 @@ -create table Regions ( - Uuid NVARCHAR(36) not null, - RegionHandle BIGINT null, - RegionName NVARCHAR(32) null, - RegionRecvKey NVARCHAR(128) null, - RegionSendKey NVARCHAR(128) null, - RegionSecret NVARCHAR(128) null, - RegionDataURI NVARCHAR(255) null, - ServerIP NVARCHAR(64) null, - ServerPort INT null, - ServerURI NVARCHAR(255) null, - RegionLocX INT null, - RegionLocY INT null, - RegionLocZ INT null, - EastOverrideHandle BIGINT null, - WestOverrideHandle BIGINT null, - SouthOverrideHandle BIGINT null, - NorthOverrideHandle BIGINT null, - RegionAssetURI NVARCHAR(255) null, - RegionAssetRecvKey NVARCHAR(128) null, - RegionAssetSendKey NVARCHAR(128) null, - RegionUserURI NVARCHAR(255) null, - RegionUserRecvKey NVARCHAR(128) null, - RegionUserSendKey NVARCHAR(128) null, - ServerHttpPort INT null, - ServerRemotingPort INT null, - RegionMapTextureID NVARCHAR(36) null, - Owner_uuid NVARCHAR(36) null, - OriginUUID NVARCHAR(36) null, - primary key (Uuid) -) -create index region_handle on Regions (RegionHandle) -create index region_name on Regions (RegionName) -create index overrideHandles on Regions (EastOverrideHandle, WestOverrideHandle, SouthOverrideHandle, NorthOverrideHandle) - diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql deleted file mode 100644 index 82936c4..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_InventoryStore.sql +++ /dev/null @@ -1,36 +0,0 @@ -create table InventoryFolders ( - ID NVARCHAR(255) not null, - Type SMALLINT null, - Version INT null, - ParentID NVARCHAR(255) null, - Owner NVARCHAR(255) null, - Name NVARCHAR(64) null, - primary key (ID) -) -create table InventoryItems ( - ID NVARCHAR(255) not null, - InvType INT null, - AssetType INT null, - AssetID NVARCHAR(255) null, - Folder NVARCHAR(255) null, - Owner NVARCHAR(255) null, - Creator NVARCHAR(255) null, - Name NVARCHAR(64) null, - Description NVARCHAR(64) null, - NextPermissions INT null, - CurrentPermissions INT null, - BasePermissions INT null, - EveryOnePermissions INT null, - GroupID NVARCHAR(255) null, - GroupOwned BIT null, - SalePrice INT null, - SaleType TINYINT null, - Flags INT null, - CreationDate INT null, - primary key (ID) -) -create index item_group_id on InventoryItems (GroupID) -create index item_folder_id on InventoryItems (Folder) -create index item_owner_id on InventoryItems (Owner) -create index folder_owner_id on InventoryFolders (Owner) -create index folder_parent_id on InventoryFolders (ParentID) diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql deleted file mode 100644 index 181a74c..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_RegionStore.sql +++ /dev/null @@ -1,104 +0,0 @@ -create table Prims ( - UUID NVARCHAR(255) not null, - ParentID INT null, - ParentUUID NVARCHAR(255) null, - RegionID NVARCHAR(255) null, - CreationDate INT null, - Name NVARCHAR(255) null, - Text NVARCHAR(255) null, - Description NVARCHAR(255) null, - SitName NVARCHAR(255) null, - TouchName NVARCHAR(255) null, - ObjectFlags INT null, - CreatorID NVARCHAR(255) null, - OwnerID NVARCHAR(255) null, - GroupID NVARCHAR(255) null, - LastOwnerID NVARCHAR(255) null, - OwnerMask INT null, - NextOwnerMask INT null, - GroupMask INT null, - EveryoneMask INT null, - BaseMask INT null, - PositionX REAL null, - PositionY REAL null, - PositionZ REAL null, - GroupPositionX REAL null, - GroupPositionY REAL null, - GroupPositionZ REAL null, - VelocityX REAL null, - VelocityY REAL null, - VelocityZ REAL null, - AngularVelocityX REAL null, - AngularVelocityY REAL null, - AngularVelocityZ REAL null, - AccelerationX REAL null, - AccelerationY REAL null, - AccelerationZ REAL null, - SitTargetOffsetX REAL null, - SitTargetOffsetY REAL null, - SitTargetOffsetZ REAL null, - RotationX REAL null, - RotationY REAL null, - RotationZ REAL null, - RotationW REAL null, - SitTargetOrientX REAL null, - SitTargetOrientY REAL null, - SitTargetOrientZ REAL null, - SitTargetOrientW REAL null, - ScaleX REAL null, - ScaleY REAL null, - ScaleZ REAL null, - PCode TINYINT null, - PathBegin INT null, - PathEnd INT null, - PathScaleX TINYINT null, - PathScaleY TINYINT null, - PathShearX TINYINT null, - PathShearY TINYINT null, - PathSkew TINYINT null, - PathCurve TINYINT null, - PathRadiusOffset TINYINT null, - PathRevolutions TINYINT null, - PathTaperX TINYINT null, - PathTaperY TINYINT null, - PathTwist TINYINT null, - ProfileBegin INT null, - ProfileEnd INT null, - ProfileCurve TINYINT null, - ProfileHollow INT null, - Texture VARBINARY(8000) null, - ExtraParams VARBINARY(8000) null, - State TINYINT null, - primary key (UUID) -) - -create table PrimItems ( - ItemID NVARCHAR(255) not null, - PrimID NVARCHAR(255) null, - AssetID NVARCHAR(255) null, - ParentFolderID NVARCHAR(255) null, - CreatorID NVARCHAR(255) null, - OwnerID NVARCHAR(255) null, - GroupID NVARCHAR(255) null, - LastOwnerID NVARCHAR(255) null, - CurrentPermissions INT null, - BasePermissions INT null, - EveryonePermissions INT null, - GroupPermissions INT null, - NextPermissions INT null, - Name NVARCHAR(255) null, - Description NVARCHAR(255) null, - CreationDate INT null, - Flags INT null, - Type INT null, - InvType INT null, - primary key (ItemID) -) - -create table Terrain ( - RegionID NVARCHAR(255) not null, - MapData VARBINARY(max) null, - primary key (RegionID) -) - - diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql deleted file mode 100644 index c9c6c89..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/001_UserStore.sql +++ /dev/null @@ -1,77 +0,0 @@ -create table UserAgents ( - ProfileID NVARCHAR(255) not null, - AgentIP NVARCHAR(24) null, - AgentPort INT null, - AgentOnline BIT null, - SessionID NVARCHAR(255) null, - SecureSessionID NVARCHAR(255) null, - InitialRegion NVARCHAR(255) null, - Region NVARCHAR(255) null, - LoginTime INT null, - LogoutTime INT null, - Handle BIGINT null, - primary key (ProfileID) -) - -create table UserProfiles ( - ID NVARCHAR(255) not null, - FirstName NVARCHAR(32) null, - SurName NVARCHAR(32) null, - PasswordHash NVARCHAR(32) null, - PasswordSalt NVARCHAR(32) null, - WebLoginKey NVARCHAR(255) null, - HomeRegionX INT null, - HomeRegionY INT null, - HomeLocationX REAL null, - HomeLocationY REAL null, - HomeLocationZ REAL null, - HomeLookAtX REAL null, - HomeLookAtY REAL null, - HomeLookAtZ REAL null, - Created INT null, - LastLogin INT null, - RootInventoryFolderID NVARCHAR(255) null, - UserInventoryURI NVARCHAR(255) null, - UserAssetURI NVARCHAR(255) null, - Image NVARCHAR(255) null, - FirstLifeImage NVARCHAR(255) null, - AboutText NVARCHAR(255) null, - FirstLifeAboutText NVARCHAR(255) null, - primary key (ID) -) -create table UserAppearances ( - Owner NVARCHAR(255) not null, - BodyItem NVARCHAR(255) null, - BodyAsset NVARCHAR(255) null, - SkinItem NVARCHAR(255) null, - SkinAsset NVARCHAR(255) null, - HairItem NVARCHAR(255) null, - HairAsset NVARCHAR(255) null, - EyesItem NVARCHAR(255) null, - EyesAsset NVARCHAR(255) null, - ShirtItem NVARCHAR(255) null, - ShirtAsset NVARCHAR(255) null, - PantsItem NVARCHAR(255) null, - PantsAsset NVARCHAR(255) null, - ShoesItem NVARCHAR(255) null, - ShoesAsset NVARCHAR(255) null, - SocksItem NVARCHAR(255) null, - SocksAsset NVARCHAR(255) null, - JacketItem NVARCHAR(255) null, - JacketAsset NVARCHAR(255) null, - GlovesItem NVARCHAR(255) null, - GlovesAsset NVARCHAR(255) null, - UnderShirtItem NVARCHAR(255) null, - UnderShirtAsset NVARCHAR(255) null, - UnderPantsItem NVARCHAR(255) null, - UnderPantsAsset NVARCHAR(255) null, - SkirtItem NVARCHAR(255) null, - SkirtAsset NVARCHAR(255) null, - Texture VARBINARY(8000) null, - VisualParams VARBINARY(8000) null, - Serial INT null, - primary key (Owner) -) - -create index user_surname on UserProfiles (SurName) -create index user_firstname on UserProfiles (FirstName) diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql deleted file mode 100644 index dfaac6e..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_RegionStore.sql +++ /dev/null @@ -1,51 +0,0 @@ -ALTER TABLE Prims ADD LinkNum INT null; -ALTER TABLE Prims ADD Material TINYINT null; -ALTER TABLE Prims ADD ScriptAccessPin INT null; -ALTER TABLE Prims ADD TextureAnimation VARBINARY(max) null; -ALTER TABLE Prims ADD ParticleSystem VARBINARY(max) null; -ALTER TABLE Prims ADD ClickAction TINYINT null; -ALTER TABLE Prims ADD Color INT null; - -CREATE TABLE RegionSettings -( - RegionID NVARCHAR(255) NOT NULL, - BlockTerraform bit NOT NULL, - BlockFly bit NOT NULL, - AllowDamage bit NOT NULL, - RestrictPushing bit NOT NULL, - AllowLandResell bit NOT NULL, - AllowLandJoinDivide bit NOT NULL, - BlockShowInSearch bit NOT NULL, - AgentLimit int NOT NULL, - ObjectBonus float(53) NOT NULL, - Maturity int NOT NULL, - DisableScripts bit NOT NULL, - DisableCollisions bit NOT NULL, - DisablePhysics bit NOT NULL, - TerrainTexture1 NVARCHAR(36) NOT NULL, - TerrainTexture2 NVARCHAR(36) NOT NULL, - TerrainTexture3 NVARCHAR(36) NOT NULL, - TerrainTexture4 NVARCHAR(36) NOT NULL, - Elevation1NW float(53) NOT NULL, - Elevation2NW float(53) NOT NULL, - Elevation1NE float(53) NOT NULL, - Elevation2NE float(53) NOT NULL, - Elevation1SE float(53) NOT NULL, - Elevation2SE float(53) NOT NULL, - Elevation1SW float(53) NOT NULL, - Elevation2SW float(53) NOT NULL, - WaterHeight float(53) NOT NULL, - TerrainRaiseLimit float(53) NOT NULL, - TerrainLowerLimit float(53) NOT NULL, - UseEstateSun bit NOT NULL, - FixedSun bit NOT NULL, - SunPosition float(53) NOT NULL, - Covenant NVARCHAR(36) NULL DEFAULT (NULL), - Sandbox bit NOT NULL, - SunVectorX float(53) NOT NULL DEFAULT ((0)), - SunVectorY float(53) NOT NULL DEFAULT ((0)), - SunVectorZ float(53) NOT NULL DEFAULT ((0)), - - primary key (RegionID) -) - diff --git a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql deleted file mode 100644 index f5e0c00..0000000 --- a/OpenSim/Data/NHibernate/Resources/MsSql2005Dialect/002_UserStore.sql +++ /dev/null @@ -1,27 +0,0 @@ -ALTER TABLE UserAgents ADD PositionX REAL null; -ALTER TABLE UserAgents ADD PositionY REAL null; -ALTER TABLE UserAgents ADD PositionZ REAL null; -ALTER TABLE UserAgents ADD LookAtX REAL null; -ALTER TABLE UserAgents ADD LookAtY REAL null; -ALTER TABLE UserAgents ADD LookAtZ REAL null; - -ALTER TABLE UserProfiles ADD Email NVARCHAR(250) null; -ALTER TABLE UserProfiles ADD HomeRegionID NVARCHAR(36) null; -ALTER TABLE UserProfiles ADD CanDoMask INT null; -ALTER TABLE UserProfiles ADD WantDoMask INT null; -ALTER TABLE UserProfiles ADD UserFlags INT null; -ALTER TABLE UserProfiles ADD GodLevel INT null; -ALTER TABLE UserProfiles ADD CustomType NVARCHAR(32) null; -ALTER TABLE UserProfiles ADD Partner NVARCHAR(36) null; - -ALTER TABLE UserAppearances ADD AvatarHeight FLOAT null; - -CREATE TABLE UserFriends ( - UserFriendID NVARCHAR(36) NOT NULL, - OwnerID NVARCHAR(36) NULL, - FriendID NVARCHAR(36) NULL, - FriendPermissions INT NULL, - PRIMARY KEY (UserFriendID) -); - -CREATE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID); diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql deleted file mode 100644 index cd0958d..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE Assets ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - Local BIT DEFAULT NULL, - Temporary BIT DEFAULT NULL, - Data LONGBLOB, - PRIMARY KEY (ID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql deleted file mode 100644 index e9ae07e..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_EstateStore.sql +++ /dev/null @@ -1,71 +0,0 @@ -CREATE TABLE EstateSettings ( - EstateID INT NOT NULL, - ParentEstateID INT DEFAULT NULL, - EstateOwnerID VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - RedirectGridX INT DEFAULT NULL, - RedirectGridY INT DEFAULT NULL, - BillableFactor DOUBLE DEFAULT NULL, - PricePerMeter INT DEFAULT NULL, - SunPosition DOUBLE DEFAULT NULL, - - UseGlobalTime BIT DEFAULT NULL, - FixedSun BIT DEFAULT NULL, - AllowVoice BIT DEFAULT NULL, - AllowDirectTeleport BIT DEFAULT NULL, - ResetHomeOnTeleport BIT DEFAULT NULL, - PublicAccess BIT DEFAULT NULL, - DenyAnonymous BIT DEFAULT NULL, - DenyIdentified BIT DEFAULT NULL, - DenyTransacted BIT DEFAULT NULL, - DenyMinors BIT DEFAULT NULL, - BlockDwell BIT DEFAULT NULL, - EstateSkipScripts BIT DEFAULT NULL, - TaxFree BIT DEFAULT NULL, - AbuseEmailToEstateOwner BIT DEFAULT NULL, - - AbuseEmail VARCHAR(255) DEFAULT NULL, - - PRIMARY KEY (EstateID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE EstateRegionLink ( - EstateRegionLinkID VARCHAR(36) NOT NULL, - EstateID INT DEFAULT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (EstateRegionLinkID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID); -CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID); - -CREATE TABLE EstateManagers ( - EstateID INT NOT NULL, - ManagerID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE EstateUsers ( - EstateID INT NOT NULL, - UserID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE EstateGroups ( - EstateID INT NOT NULL, - GroupID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE EstateBans ( - EstateID INT NOT NULL, - ArrayIndex INT NOT NULL, - BannedUserID VARCHAR(36) NOT NULL, - BannedHostAddress VARCHAR(16) NOT NULL, - BannedHostIPMask VARCHAR(16) NOT NULL, - BannedHostNameMask VARCHAR(16) NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql deleted file mode 100644 index c6fe620..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql +++ /dev/null @@ -1,35 +0,0 @@ -CREATE TABLE Regions ( - RegionID VARCHAR(36) NOT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - OriginID VARCHAR(36) DEFAULT NULL, - RegionHandle BIGINT DEFAULT NULL, - RegionName VARCHAR(32) DEFAULT NULL, - RegionRecvKey VARCHAR(128) DEFAULT NULL, - RegionSendKey VARCHAR(128) DEFAULT NULL, - RegionSecret VARCHAR(128) DEFAULT NULL, - RegionDataURI VARCHAR(255) DEFAULT NULL, - ServerIP VARCHAR(64) DEFAULT NULL, - ServerPort INT DEFAULT NULL, - ServerURI VARCHAR(255) DEFAULT NULL, - RegionLocX INT DEFAULT NULL, - RegionLocY INT DEFAULT NULL, - RegionLocZ INT DEFAULT NULL, - EastOverrideHandle BIGINT DEFAULT NULL, - WestOverrideHandle BIGINT DEFAULT NULL, - SouthOverrideHandle BIGINT DEFAULT NULL, - NorthOverrideHandle BIGINT DEFAULT NULL, - RegionAssetURI VARCHAR(255) DEFAULT NULL, - RegionAssetRecvKey VARCHAR(128) DEFAULT NULL, - RegionAssetSendKey VARCHAR(128) DEFAULT NULL, - RegionUserURI VARCHAR(255) DEFAULT NULL, - RegionUserRecvKey VARCHAR(128) DEFAULT NULL, - RegionUserSendKey VARCHAR(128) DEFAULT NULL, - RegionMapTextureId VARCHAR(36) DEFAULT NULL, - ServerHttpPort INT DEFAULT NULL, - ServerRemotingPort INT DEFAULT NULL, - PRIMARY KEY (RegionID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX RegionNameIndex ON Regions (RegionName); -CREATE INDEX RegionHandleIndex ON Regions (RegionHandle); -CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle); diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql deleted file mode 100644 index 93d282b..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql +++ /dev/null @@ -1,39 +0,0 @@ -CREATE TABLE InventoryFolders ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Version INT DEFAULT NULL, - ParentID VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - PRIMARY KEY (ID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner); -CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID); - -CREATE TABLE InventoryItems ( - ID VARCHAR(36) NOT NULL, - InvType INT DEFAULT NULL, - AssetType INT DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - Folder VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Creator VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryOnePermissions INT DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - GroupOwned BIT DEFAULT NULL, - SalePrice INT DEFAULT NULL, - SaleType TINYINT DEFAULT NULL, - Flags INT DEFAULT NULL, - CreationDate INT DEFAULT NULL, - PRIMARY KEY (ID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID); -CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner); -CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder); diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql deleted file mode 100644 index eb1d8fe..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql +++ /dev/null @@ -1,169 +0,0 @@ -CREATE TABLE Prims ( - UUID VARCHAR(36) NOT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - ParentID INT DEFAULT NULL, - ParentUUID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate INT DEFAULT NULL, - LinkNum INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Text VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - SitName VARCHAR(255) DEFAULT NULL, - TouchName VARCHAR(255) DEFAULT NULL, - ObjectFlags INT DEFAULT NULL, - OwnerMask INT DEFAULT NULL, - NextOwnerMask INT DEFAULT NULL, - GroupMask INT DEFAULT NULL, - EveryoneMask INT DEFAULT NULL, - BaseMask INT DEFAULT NULL, - Material TINYINT DEFAULT NULL, - ScriptAccessPin INT DEFAULT NULL, - TextureAnimation BLOB, - ParticleSystem BLOB, - ClickAction TINYINT DEFAULT NULL, - Color INT DEFAULT NULL, - PositionX DOUBLE DEFAULT NULL, - PositionY DOUBLE DEFAULT NULL, - PositionZ DOUBLE DEFAULT NULL, - GroupPositionX DOUBLE DEFAULT NULL, - GroupPositionY DOUBLE DEFAULT NULL, - GroupPositionZ DOUBLE DEFAULT NULL, - VelocityX DOUBLE DEFAULT NULL, - VelocityY DOUBLE DEFAULT NULL, - VelocityZ DOUBLE DEFAULT NULL, - AngularVelocityX DOUBLE DEFAULT NULL, - AngularVelocityY DOUBLE DEFAULT NULL, - AngularVelocityZ DOUBLE DEFAULT NULL, - AccelerationX DOUBLE DEFAULT NULL, - AccelerationY DOUBLE DEFAULT NULL, - AccelerationZ DOUBLE DEFAULT NULL, - RotationX DOUBLE DEFAULT NULL, - RotationY DOUBLE DEFAULT NULL, - RotationZ DOUBLE DEFAULT NULL, - RotationW DOUBLE DEFAULT NULL, - SitTargetOffsetX DOUBLE DEFAULT NULL, - SitTargetOffsetY DOUBLE DEFAULT NULL, - SitTargetOffsetZ DOUBLE DEFAULT NULL, - SitTargetOrientW DOUBLE DEFAULT NULL, - SitTargetOrientX DOUBLE DEFAULT NULL, - SitTargetOrientY DOUBLE DEFAULT NULL, - SitTargetOrientZ DOUBLE DEFAULT NULL, - -- this is the shape - Shape INT DEFAULT NULL, - ScaleX DOUBLE DEFAULT NULL, - ScaleY DOUBLE DEFAULT NULL, - ScaleZ DOUBLE DEFAULT NULL, - PCode INT DEFAULT NULL, - PathBegin INT DEFAULT NULL, - PathEnd INT DEFAULT NULL, - PathScaleX INT DEFAULT NULL, - PathScaleY INT DEFAULT NULL, - PathShearX INT DEFAULT NULL, - PathShearY INT DEFAULT NULL, - PathSkew INT DEFAULT NULL, - PathCurve INT DEFAULT NULL, - PathRadiusOffset INT DEFAULT NULL, - PathRevolutions INT DEFAULT NULL, - PathTaperX INT DEFAULT NULL, - PathTaperY INT DEFAULT NULL, - PathTwist INT DEFAULT NULL, - ProfileBegin INT DEFAULT NULL, - ProfileEnd INT DEFAULT NULL, - ProfileCurve INT DEFAULT NULL, - ProfileHollow INT DEFAULT NULL, - State INT DEFAULT NULL, - Texture LONGBLOB, - ExtraParams LONGBLOB, - PRIMARY KEY (UUID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID); -CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID); - -CREATE TABLE Terrain ( - RegionID VARCHAR(36) not null, - MapData LONGBLOB, - PRIMARY KEY (RegionID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE PrimItems ( - ItemID VARCHAR(36) NOT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - PrimID VARCHAR(36) DEFAULT NULL, - ParentFolderID VARCHAR(36) DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate BIGINT DEFAULT NULL, - Type INT DEFAULT NULL, - InvType INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryonePermissions INT DEFAULT NULL, - GroupPermissions INT DEFAULT NULL, - Flags INT DEFAULT NULL, - PRIMARY KEY (ItemID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID); - -CREATE TABLE RegionSettings ( - RegionID VARCHAR(36) NOT NULL, - - BlockTerraform BIT DEFAULT NULL, - BlockFly BIT DEFAULT NULL, - AllowDamage BIT DEFAULT NULL, - RestrictPushing BIT DEFAULT NULL, - AllowLandResell BIT DEFAULT NULL, - AllowLandJoinDivide BIT DEFAULT NULL, - BlockShowInSearch BIT DEFAULT NULL, - - AgentLimit INT DEFAULT NULL, - ObjectBonus DOUBLE DEFAULT NULL, - Maturity INT DEFAULT NULL, - - DisableScripts BIT DEFAULT NULL, - DisableCollisions BIT DEFAULT NULL, - DisablePhysics BIT DEFAULT NULL, - - TerrainTexture1 VARCHAR(36) DEFAULT NULL, - TerrainTexture2 VARCHAR(36) DEFAULT NULL, - TerrainTexture3 VARCHAR(36) DEFAULT NULL, - TerrainTexture4 VARCHAR(36) DEFAULT NULL, - - Elevation1NW DOUBLE DEFAULT NULL, - Elevation2NW DOUBLE DEFAULT NULL, - Elevation1NE DOUBLE DEFAULT NULL, - Elevation2NE DOUBLE DEFAULT NULL, - Elevation1SE DOUBLE DEFAULT NULL, - Elevation2SE DOUBLE DEFAULT NULL, - Elevation1SW DOUBLE DEFAULT NULL, - Elevation2SW DOUBLE DEFAULT NULL, - - WaterHeight DOUBLE DEFAULT NULL, - TerrainRaiseLimit DOUBLE DEFAULT NULL, - TerrainLowerLimit DOUBLE DEFAULT NULL, - - UseEstateSun BIT DEFAULT NULL, - Sandbox BIT DEFAULT NULL, - - SunVectorX DOUBLE DEFAULT NULL, - SunVectorY DOUBLE DEFAULT NULL, - SunVectorZ DOUBLE DEFAULT NULL, - - FixedSun BIT DEFAULT NULL, - SunPosition DOUBLE DEFAULT NULL, - - Covenant VARCHAR(36) DEFAULT NULL, - - PRIMARY KEY (RegionID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql deleted file mode 100644 index 140aea4..0000000 --- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql +++ /dev/null @@ -1,104 +0,0 @@ -CREATE TABLE UserAgents ( - ProfileID VARCHAR(36) NOT NULL, - AgentIP VARCHAR(24) DEFAULT NULL, - AgentPort INT DEFAULT NULL, - AgentOnline BIT DEFAULT NULL, - SessionID VARCHAR(36) DEFAULT NULL, - SecureSessionID VARCHAR(36) DEFAULT NULL, - InitialRegion VARCHAR(255) DEFAULT NULL, - Region VARCHAR(255) DEFAULT NULL, - LoginTime INT DEFAULT NULL, - LogoutTime INT DEFAULT NULL, - Handle BIGINT DEFAULT NULL, - PositionX DOUBLE DEFAULT NULL, - PositionY DOUBLE DEFAULT NULL, - PositionZ DOUBLE DEFAULT NULL, - LookAtX DOUBLE DEFAULT NULL, - LookAtY DOUBLE DEFAULT NULL, - LookAtZ DOUBLE DEFAULT NULL, - PRIMARY KEY (ProfileID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE UserProfiles ( - ID VARCHAR(36) NOT NULL, - WebLoginKey VARCHAR(36) DEFAULT NULL, - FirstName VARCHAR(32) DEFAULT NULL, - SurName VARCHAR(32) DEFAULT NULL, - Email VARCHAR(250) DEFAULT NULL, - PasswordHash VARCHAR(32) DEFAULT NULL, - PasswordSalt VARCHAR(32) DEFAULT NULL, - HomeRegionID VARCHAR(36) DEFAULT NULL, - HomeRegionX INT DEFAULT NULL, - HomeRegionY INT DEFAULT NULL, - HomeLocationX DOUBLE DEFAULT NULL, - HomeLocationY DOUBLE DEFAULT NULL, - HomeLocationZ DOUBLE DEFAULT NULL, - HomeLookAtX DOUBLE DEFAULT NULL, - HomeLookAtY DOUBLE DEFAULT NULL, - HomeLookAtZ DOUBLE DEFAULT NULL, - Created INT DEFAULT NULL, - LastLogin INT DEFAULT NULL, - UserInventoryURI VARCHAR(255) DEFAULT NULL, - UserAssetURI VARCHAR(255) DEFAULT NULL, - Image VARCHAR(36) DEFAULT NULL, - FirstLifeImage VARCHAR(36) DEFAULT NULL, - AboutText TEXT DEFAULT NULL, - FirstLifeAboutText TEXT DEFAULT NULL, - CanDoMask INT DEFAULT NULL, - WantDoMask INT DEFAULT NULL, - UserFlags INT DEFAULT NULL, - GodLevel INT DEFAULT NULL, - CustomType VARCHAR(32) DEFAULT NULL, - Partner VARCHAR(36) DEFAULT NULL, - RootInventoryFolderID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (ID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE INDEX UserSurnameIndex ON UserProfiles (SurName); -CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName); -CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName); - -CREATE TABLE UserAppearances ( - Owner VARCHAR(36) NOT NULL, - BodyItem VARCHAR(36) DEFAULT NULL, - BodyAsset VARCHAR(36) DEFAULT NULL, - SkinItem VARCHAR(36) DEFAULT NULL, - SkinAsset VARCHAR(36) DEFAULT NULL, - HairItem VARCHAR(36) DEFAULT NULL, - HairAsset VARCHAR(36) DEFAULT NULL, - EyesItem VARCHAR(36) DEFAULT NULL, - EyesAsset VARCHAR(36) DEFAULT NULL, - ShirtItem VARCHAR(36) DEFAULT NULL, - ShirtAsset VARCHAR(36) DEFAULT NULL, - PantsItem VARCHAR(36) DEFAULT NULL, - PantsAsset VARCHAR(36) DEFAULT NULL, - ShoesItem VARCHAR(36) DEFAULT NULL, - ShoesAsset VARCHAR(36) DEFAULT NULL, - SocksItem VARCHAR(36) DEFAULT NULL, - SocksAsset VARCHAR(36) DEFAULT NULL, - JacketItem VARCHAR(36) DEFAULT NULL, - JacketAsset VARCHAR(36) DEFAULT NULL, - GlovesItem VARCHAR(36) DEFAULT NULL, - GlovesAsset VARCHAR(36) DEFAULT NULL, - UnderShirtItem VARCHAR(36) DEFAULT NULL, - UnderShirtAsset VARCHAR(36) DEFAULT NULL, - UnderPantsItem VARCHAR(36) DEFAULT NULL, - UnderPantsAsset VARCHAR(36) DEFAULT NULL, - SkirtItem VARCHAR(36) DEFAULT NULL, - SkirtAsset VARCHAR(36) DEFAULT NULL, - Texture LONGBLOB, - VisualParams LONGBLOB, - Serial INT DEFAULT NULL, - AvatarHeight FLOAT DEFAULT NULL, - PRIMARY KEY (Owner) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE TABLE UserFriends ( - UserFriendID VARCHAR(36) NOT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - FriendID VARCHAR(36) DEFAULT NULL, - FriendPermissions INT DEFAULT NULL, - PRIMARY KEY (UserFriendID) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; - -CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID); diff --git a/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml b/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml deleted file mode 100644 index 37b23cb..0000000 --- a/OpenSim/Data/NHibernate/Resources/OpenSim.Data.NHibernate.addin.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql deleted file mode 100644 index 4753123..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_AssetStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE Assets ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - Local BOOLEAN DEFAULT NULL, - Temporary BOOLEAN DEFAULT NULL, - Data BYTEA, - PRIMARY KEY (ID) -); diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql deleted file mode 100644 index 3f47930..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_EstateStore.sql +++ /dev/null @@ -1,72 +0,0 @@ -CREATE TABLE EstateSettings ( - EstateID INT NOT NULL, - ParentEstateID INT DEFAULT NULL, - EstateOwnerID VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - RedirectGridX INT DEFAULT NULL, - RedirectGridY INT DEFAULT NULL, - BillableFactor DOUBLE PRECISION DEFAULT NULL, - PricePerMeter INT DEFAULT NULL, - SunPosition DOUBLE PRECISION DEFAULT NULL, - - UseGlobalTime BOOLEAN DEFAULT NULL, - FixedSun BOOLEAN DEFAULT NULL, - AllowVoice BOOLEAN DEFAULT NULL, - AllowDirectTeleport BOOLEAN DEFAULT NULL, - ResetHomeOnTeleport BOOLEAN DEFAULT NULL, - PublicAccess BOOLEAN DEFAULT NULL, - DenyAnonymous BOOLEAN DEFAULT NULL, - DenyIdentified BOOLEAN DEFAULT NULL, - DenyTransacted BOOLEAN DEFAULT NULL, - DenyMinors BOOLEAN DEFAULT NULL, - BlockDwell BOOLEAN DEFAULT NULL, - EstateSkipScripts BOOLEAN DEFAULT NULL, - TaxFree BOOLEAN DEFAULT NULL, - AbuseEmailToEstateOwner BOOLEAN DEFAULT NULL, - - AbuseEmail VARCHAR(255) DEFAULT NULL, - - PRIMARY KEY (EstateID) -); - -CREATE TABLE EstateRegionLink ( - EstateRegionLinkID VARCHAR(36) NOT NULL, - EstateID INT DEFAULT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (EstateRegionLinkID) -); - -CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID); -CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID); - - -CREATE TABLE EstateManagers ( - EstateID INT NOT NULL, - ManagerID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateUsers ( - EstateID INT NOT NULL, - UserID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateGroups ( - EstateID INT NOT NULL, - GroupID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateBans ( - EstateID INT NOT NULL, - ArrayIndex INT NOT NULL, - BannedUserID VARCHAR(36) NOT NULL, - BannedHostAddress VARCHAR(16) NOT NULL, - BannedHostIPMask VARCHAR(16) NOT NULL, - BannedHostNameMask VARCHAR(16) NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); \ No newline at end of file diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql deleted file mode 100644 index 4366c1e..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_GridStore.sql +++ /dev/null @@ -1,35 +0,0 @@ -CREATE TABLE Regions ( - RegionID VARCHAR(36) NOT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - OriginID VARCHAR(36) DEFAULT NULL, - RegionHandle BIGINT DEFAULT NULL, - RegionName VARCHAR(32) DEFAULT NULL, - RegionRecvKey VARCHAR(128) DEFAULT NULL, - RegionSendKey VARCHAR(128) DEFAULT NULL, - RegionSecret VARCHAR(128) DEFAULT NULL, - RegionDataURI VARCHAR(255) DEFAULT NULL, - ServerIP VARCHAR(64) DEFAULT NULL, - ServerPort INT DEFAULT NULL, - ServerURI VARCHAR(255) DEFAULT NULL, - RegionLocX INT DEFAULT NULL, - RegionLocY INT DEFAULT NULL, - RegionLocZ INT DEFAULT NULL, - EastOverrideHandle BIGINT DEFAULT NULL, - WestOverrideHandle BIGINT DEFAULT NULL, - SouthOverrideHandle BIGINT DEFAULT NULL, - NorthOverrideHandle BIGINT DEFAULT NULL, - RegionAssetURI VARCHAR(255) DEFAULT NULL, - RegionAssetRecvKey VARCHAR(128) DEFAULT NULL, - RegionAssetSendKey VARCHAR(128) DEFAULT NULL, - RegionUserURI VARCHAR(255) DEFAULT NULL, - RegionUserRecvKey VARCHAR(128) DEFAULT NULL, - RegionUserSendKey VARCHAR(128) DEFAULT NULL, - RegionMapTextureId VARCHAR(36) DEFAULT NULL, - ServerHttpPort INT DEFAULT NULL, - ServerRemotingPort INT DEFAULT NULL, - PRIMARY KEY (RegionID) -); - -CREATE INDEX RegionNameIndex ON Regions (RegionName); -CREATE INDEX RegionHandleIndex ON Regions (RegionHandle); -CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle); diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql deleted file mode 100644 index 42af659..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_InventoryStore.sql +++ /dev/null @@ -1,39 +0,0 @@ -CREATE TABLE InventoryFolders ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Version INT DEFAULT NULL, - ParentID VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner); -CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID); - -CREATE TABLE InventoryItems ( - ID VARCHAR(36) NOT NULL, - InvType INT DEFAULT NULL, - AssetType INT DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - Folder VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Creator VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryOnePermissions INT DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - GroupOwned BOOLEAN DEFAULT NULL, - SalePrice INT DEFAULT NULL, - SaleType SMALLINT DEFAULT NULL, - Flags INT DEFAULT NULL, - CreationDate INT DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID); -CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner); -CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder); diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql deleted file mode 100644 index f4a0e68..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_RegionStore.sql +++ /dev/null @@ -1,169 +0,0 @@ -CREATE TABLE Prims ( - UUID VARCHAR(36) NOT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - ParentID INT DEFAULT NULL, - ParentUUID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate INT DEFAULT NULL, - LinkNum INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Text VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - SitName VARCHAR(255) DEFAULT NULL, - TouchName VARCHAR(255) DEFAULT NULL, - ObjectFlags INT DEFAULT NULL, - OwnerMask INT DEFAULT NULL, - NextOwnerMask INT DEFAULT NULL, - GroupMask INT DEFAULT NULL, - EveryoneMask INT DEFAULT NULL, - BaseMask INT DEFAULT NULL, - Material SMALLINT DEFAULT NULL, - ScriptAccessPin INT DEFAULT NULL, - TextureAnimation BYTEA, - ParticleSystem BYTEA, - ClickAction SMALLINT DEFAULT NULL, - Color INT DEFAULT NULL, - PositionX DOUBLE PRECISION DEFAULT NULL, - PositionY DOUBLE PRECISION DEFAULT NULL, - PositionZ DOUBLE PRECISION DEFAULT NULL, - GroupPositionX DOUBLE PRECISION DEFAULT NULL, - GroupPositionY DOUBLE PRECISION DEFAULT NULL, - GroupPositionZ DOUBLE PRECISION DEFAULT NULL, - VelocityX DOUBLE PRECISION DEFAULT NULL, - VelocityY DOUBLE PRECISION DEFAULT NULL, - VelocityZ DOUBLE PRECISION DEFAULT NULL, - AngularVelocityX DOUBLE PRECISION DEFAULT NULL, - AngularVelocityY DOUBLE PRECISION DEFAULT NULL, - AngularVelocityZ DOUBLE PRECISION DEFAULT NULL, - AccelerationX DOUBLE PRECISION DEFAULT NULL, - AccelerationY DOUBLE PRECISION DEFAULT NULL, - AccelerationZ DOUBLE PRECISION DEFAULT NULL, - RotationX DOUBLE PRECISION DEFAULT NULL, - RotationY DOUBLE PRECISION DEFAULT NULL, - RotationZ DOUBLE PRECISION DEFAULT NULL, - RotationW DOUBLE PRECISION DEFAULT NULL, - SitTargetOffsetX DOUBLE PRECISION DEFAULT NULL, - SitTargetOffsetY DOUBLE PRECISION DEFAULT NULL, - SitTargetOffsetZ DOUBLE PRECISION DEFAULT NULL, - SitTargetOrientW DOUBLE PRECISION DEFAULT NULL, - SitTargetOrientX DOUBLE PRECISION DEFAULT NULL, - SitTargetOrientY DOUBLE PRECISION DEFAULT NULL, - SitTargetOrientZ DOUBLE PRECISION DEFAULT NULL, - -- this is the shape - Shape INT DEFAULT NULL, - ScaleX DOUBLE PRECISION DEFAULT NULL, - ScaleY DOUBLE PRECISION DEFAULT NULL, - ScaleZ DOUBLE PRECISION DEFAULT NULL, - PCode INT DEFAULT NULL, - PathBegin INT DEFAULT NULL, - PathEnd INT DEFAULT NULL, - PathScaleX INT DEFAULT NULL, - PathScaleY INT DEFAULT NULL, - PathShearX INT DEFAULT NULL, - PathShearY INT DEFAULT NULL, - PathSkew SMALLINT DEFAULT NULL, - PathCurve INT DEFAULT NULL, - PathRadiusOffset SMALLINT DEFAULT NULL, - PathRevolutions INT DEFAULT NULL, - PathTaperX SMALLINT DEFAULT NULL, - PathTaperY SMALLINT DEFAULT NULL, - PathTwist SMALLINT DEFAULT NULL, - ProfileBegin INT DEFAULT NULL, - ProfileEnd INT DEFAULT NULL, - ProfileCurve INT DEFAULT NULL, - ProfileHollow INT DEFAULT NULL, - State INT DEFAULT NULL, - Texture BYTEA, - ExtraParams BYTEA, - PRIMARY KEY (UUID) -); - -CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID); -CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID); - -CREATE TABLE Terrain ( - RegionID VARCHAR(36) not null, - MapData BYTEA, - PRIMARY KEY (RegionID) -); - -CREATE TABLE PrimItems ( - ItemID VARCHAR(36) NOT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - PrimID VARCHAR(36) DEFAULT NULL, - ParentFolderID VARCHAR(36) DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate INT DEFAULT NULL, - Type INT DEFAULT NULL, - InvType INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryonePermissions INT DEFAULT NULL, - GroupPermissions INT DEFAULT NULL, - Flags INT DEFAULT NULL, - PRIMARY KEY (ItemID) -); - -CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID); - -CREATE TABLE RegionSettings ( - RegionID VARCHAR(36) NOT NULL, - - BlockTerraform BOOLEAN DEFAULT NULL, - BlockFly BOOLEAN DEFAULT NULL, - AllowDamage BOOLEAN DEFAULT NULL, - RestrictPushing BOOLEAN DEFAULT NULL, - AllowLandResell BOOLEAN DEFAULT NULL, - AllowLandJoinDivide BOOLEAN DEFAULT NULL, - BlockShowInSearch BOOLEAN DEFAULT NULL, - - AgentLimit INT DEFAULT NULL, - ObjectBonus DOUBLE PRECISION DEFAULT NULL, - Maturity INT DEFAULT NULL, - - DisableScripts BOOLEAN DEFAULT NULL, - DisableCollisions BOOLEAN DEFAULT NULL, - DisablePhysics BOOLEAN DEFAULT NULL, - - TerrainTexture1 VARCHAR(36) DEFAULT NULL, - TerrainTexture2 VARCHAR(36) DEFAULT NULL, - TerrainTexture3 VARCHAR(36) DEFAULT NULL, - TerrainTexture4 VARCHAR(36) DEFAULT NULL, - - Elevation1NW DOUBLE PRECISION DEFAULT NULL, - Elevation2NW DOUBLE PRECISION DEFAULT NULL, - Elevation1NE DOUBLE PRECISION DEFAULT NULL, - Elevation2NE DOUBLE PRECISION DEFAULT NULL, - Elevation1SE DOUBLE PRECISION DEFAULT NULL, - Elevation2SE DOUBLE PRECISION DEFAULT NULL, - Elevation1SW DOUBLE PRECISION DEFAULT NULL, - Elevation2SW DOUBLE PRECISION DEFAULT NULL, - - WaterHeight DOUBLE PRECISION DEFAULT NULL, - TerrainRaiseLimit DOUBLE PRECISION DEFAULT NULL, - TerrainLowerLimit DOUBLE PRECISION DEFAULT NULL, - - UseEstateSun BOOLEAN DEFAULT NULL, - Sandbox BOOLEAN DEFAULT NULL, - - SunVectorX DOUBLE PRECISION DEFAULT NULL, - SunVectorY DOUBLE PRECISION DEFAULT NULL, - SunVectorZ DOUBLE PRECISION DEFAULT NULL, - - FixedSun BOOLEAN DEFAULT NULL, - SunPosition DOUBLE PRECISION DEFAULT NULL, - - Covenant VARCHAR(36) DEFAULT NULL, - - PRIMARY KEY (RegionID) -); - diff --git a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql deleted file mode 100644 index b3c7ef1..0000000 --- a/OpenSim/Data/NHibernate/Resources/PostgreSQLDialect/001_UserStore.sql +++ /dev/null @@ -1,104 +0,0 @@ -CREATE TABLE UserAgents ( - ProfileID VARCHAR(36) NOT NULL, - AgentIP VARCHAR(24) DEFAULT NULL, - AgentPort INT DEFAULT NULL, - AgentOnline BOOLEAN DEFAULT NULL, - SessionID VARCHAR(36) DEFAULT NULL, - SecureSessionID VARCHAR(36) DEFAULT NULL, - InitialRegion VARCHAR(255) DEFAULT NULL, - Region VARCHAR(255) DEFAULT NULL, - LoginTime INT DEFAULT NULL, - LogoutTime INT DEFAULT NULL, - Handle BIGINT DEFAULT NULL, - PositionX DOUBLE PRECISION DEFAULT NULL, - PositionY DOUBLE PRECISION DEFAULT NULL, - PositionZ DOUBLE PRECISION DEFAULT NULL, - LookAtX DOUBLE PRECISION DEFAULT NULL, - LookAtY DOUBLE PRECISION DEFAULT NULL, - LookAtZ DOUBLE PRECISION DEFAULT NULL, - PRIMARY KEY (ProfileID) -); - -CREATE TABLE UserProfiles ( - ID VARCHAR(36) NOT NULL, - WebLoginKey VARCHAR(36) DEFAULT NULL, - FirstName VARCHAR(32) DEFAULT NULL, - SurName VARCHAR(32) DEFAULT NULL, - Email VARCHAR(250) DEFAULT NULL, - PasswordHash VARCHAR(32) DEFAULT NULL, - PasswordSalt VARCHAR(32) DEFAULT NULL, - HomeRegionID VARCHAR(36) DEFAULT NULL, - HomeRegionX INT DEFAULT NULL, - HomeRegionY INT DEFAULT NULL, - HomeLocationX DOUBLE PRECISION DEFAULT NULL, - HomeLocationY DOUBLE PRECISION DEFAULT NULL, - HomeLocationZ DOUBLE PRECISION DEFAULT NULL, - HomeLookAtX DOUBLE PRECISION DEFAULT NULL, - HomeLookAtY DOUBLE PRECISION DEFAULT NULL, - HomeLookAtZ DOUBLE PRECISION DEFAULT NULL, - Created INT DEFAULT NULL, - LastLogin INT DEFAULT NULL, - UserInventoryURI VARCHAR(255) DEFAULT NULL, - UserAssetURI VARCHAR(255) DEFAULT NULL, - Image VARCHAR(36) DEFAULT NULL, - FirstLifeImage VARCHAR(36) DEFAULT NULL, - AboutText TEXT DEFAULT NULL, - FirstLifeAboutText TEXT DEFAULT NULL, - CanDoMask INT DEFAULT NULL, - WantDoMask INT DEFAULT NULL, - UserFlags INT DEFAULT NULL, - GodLevel INT DEFAULT NULL, - CustomType VARCHAR(32) DEFAULT NULL, - Partner VARCHAR(36) DEFAULT NULL, - RootInventoryFolderID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX UserSurnameIndex ON UserProfiles (SurName); -CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName); -CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName); - -CREATE TABLE UserAppearances ( - Owner VARCHAR(36) NOT NULL, - BodyItem VARCHAR(36) DEFAULT NULL, - BodyAsset VARCHAR(36) DEFAULT NULL, - SkinItem VARCHAR(36) DEFAULT NULL, - SkinAsset VARCHAR(36) DEFAULT NULL, - HairItem VARCHAR(36) DEFAULT NULL, - HairAsset VARCHAR(36) DEFAULT NULL, - EyesItem VARCHAR(36) DEFAULT NULL, - EyesAsset VARCHAR(36) DEFAULT NULL, - ShirtItem VARCHAR(36) DEFAULT NULL, - ShirtAsset VARCHAR(36) DEFAULT NULL, - PantsItem VARCHAR(36) DEFAULT NULL, - PantsAsset VARCHAR(36) DEFAULT NULL, - ShoesItem VARCHAR(36) DEFAULT NULL, - ShoesAsset VARCHAR(36) DEFAULT NULL, - SocksItem VARCHAR(36) DEFAULT NULL, - SocksAsset VARCHAR(36) DEFAULT NULL, - JacketItem VARCHAR(36) DEFAULT NULL, - JacketAsset VARCHAR(36) DEFAULT NULL, - GlovesItem VARCHAR(36) DEFAULT NULL, - GlovesAsset VARCHAR(36) DEFAULT NULL, - UnderShirtItem VARCHAR(36) DEFAULT NULL, - UnderShirtAsset VARCHAR(36) DEFAULT NULL, - UnderPantsItem VARCHAR(36) DEFAULT NULL, - UnderPantsAsset VARCHAR(36) DEFAULT NULL, - SkirtItem VARCHAR(36) DEFAULT NULL, - SkirtAsset VARCHAR(36) DEFAULT NULL, - Texture BYTEA, - VisualParams BYTEA, - Serial INT DEFAULT NULL, - AvatarHeight FLOAT DEFAULT NULL, - PRIMARY KEY (Owner) -); - -CREATE TABLE UserFriends ( - UserFriendID VARCHAR(36) NOT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - FriendID VARCHAR(36) DEFAULT NULL, - FriendPermissions INT DEFAULT NULL, - PRIMARY KEY (UserFriendID) -); - -CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID); diff --git a/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml deleted file mode 100644 index 5ff37d8..0000000 --- a/OpenSim/Data/NHibernate/Resources/RegionProfileData.hbm.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml deleted file mode 100644 index 3843a8d..0000000 --- a/OpenSim/Data/NHibernate/Resources/RegionSettings.hbm.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml deleted file mode 100644 index 98c648b..0000000 --- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql deleted file mode 100644 index aedf764..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE Assets ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - Local BIT DEFAULT NULL, - Temporary BIT DEFAULT NULL, - Data BLOB, - PRIMARY KEY (ID) -); diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql deleted file mode 100644 index afe702f..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_EstateStore.sql +++ /dev/null @@ -1,71 +0,0 @@ -CREATE TABLE EstateSettings ( - EstateID INT NOT NULL, - ParentEstateID INT DEFAULT NULL, - EstateOwnerID VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - RedirectGridX INT DEFAULT NULL, - RedirectGridY INT DEFAULT NULL, - BillableFactor DOUBLE DEFAULT NULL, - PricePerMeter INT DEFAULT NULL, - SunPosition DOUBLE DEFAULT NULL, - - UseGlobalTime BIT DEFAULT NULL, - FixedSun BIT DEFAULT NULL, - AllowVoice BIT DEFAULT NULL, - AllowDirectTeleport BIT DEFAULT NULL, - ResetHomeOnTeleport BIT DEFAULT NULL, - PublicAccess BIT DEFAULT NULL, - DenyAnonymous BIT DEFAULT NULL, - DenyIdentified BIT DEFAULT NULL, - DenyTransacted BIT DEFAULT NULL, - DenyMinors BIT DEFAULT NULL, - BlockDwell BIT DEFAULT NULL, - EstateSkipScripts BIT DEFAULT NULL, - TaxFree BIT DEFAULT NULL, - AbuseEmailToEstateOwner BIT DEFAULT NULL, - - AbuseEmail VARCHAR(255) DEFAULT NULL, - - PRIMARY KEY (EstateID) -); - -CREATE TABLE EstateRegionLink ( - EstateRegionLinkID VARCHAR(36) NOT NULL, - EstateID INT DEFAULT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (EstateRegionLinkID) -); - -CREATE INDEX EstateRegionLinkEstateIDIndex ON EstateRegionLink (EstateID); -CREATE INDEX EstateRegionLinkERegionIDIndex ON EstateRegionLink (RegionID); - -CREATE TABLE EstateManagers ( - EstateID INT NOT NULL, - ManagerID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateUsers ( - EstateID INT NOT NULL, - UserID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateGroups ( - EstateID INT NOT NULL, - GroupID VARCHAR(36) NOT NULL, - ArrayIndex INT NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); - -CREATE TABLE EstateBans ( - EstateID INT NOT NULL, - ArrayIndex INT NOT NULL, - BannedUserID VARCHAR(36) NOT NULL, - BannedHostAddress VARCHAR(16) NOT NULL, - BannedHostIPMask VARCHAR(16) NOT NULL, - BannedHostNameMask VARCHAR(16) NOT NULL, - PRIMARY KEY (EstateID,ArrayIndex) -); diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql deleted file mode 100644 index 4f09848..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql +++ /dev/null @@ -1,35 +0,0 @@ -CREATE TABLE Regions ( - RegionId VARCHAR(36) NOT NULL, - RegionHandle BIGINT UNSIGNED NOT NULL, - RegionName VARCHAR(32) DEFAULT NULL, - RegionRecvKey VARCHAR(128) DEFAULT NULL, - RegionSendKey VARCHAR(128) DEFAULT NULL, - RegionSecret VARCHAR(128) DEFAULT NULL, - RegionDataURI VARCHAR(255) DEFAULT NULL, - ServerIP VARCHAR(64) DEFAULT NULL, - ServerPort INT UNSIGNED DEFAULT NULL, - ServerURI VARCHAR(255) DEFAULT NULL, - RegionLocX INT UNSIGNED DEFAULT NULL, - RegionLocY INT UNSIGNED DEFAULT NULL, - RegionLocZ INT UNSIGNED DEFAULT NULL, - EastOverrideHandle BIGINT UNSIGNED DEFAULT NULL, - WestOverrideHandle BIGINT UNSIGNED DEFAULT NULL, - SouthOverrideHandle BIGINT UNSIGNED DEFAULT NULL, - NorthOverrideHandle BIGINT UNSIGNED DEFAULT NULL, - RegionAssetURI VARCHAR(255) DEFAULT NULL, - RegionAssetRecvKey VARCHAR(128) DEFAULT NULL, - RegionAssetSendKey VARCHAR(128) DEFAULT NULL, - RegionUserURI VARCHAR(255) DEFAULT NULL, - RegionUserRecvKey VARCHAR(128) DEFAULT NULL, - RegionUserSendKey VARCHAR(128) DEFAULT NULL, - RegionMapTextureId VARCHAR(36) DEFAULT NULL, - ServerHttpPort INT DEFAULT NULL, - ServerRemotingPort INT DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - OriginID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (RegionId) -); - -CREATE INDEX RegionNameIndex ON Regions (RegionName); -CREATE INDEX RegionHandleIndex ON Regions (RegionHandle); -CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle); diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql deleted file mode 100644 index 38978ee..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql +++ /dev/null @@ -1,39 +0,0 @@ -CREATE TABLE InventoryFolders ( - ID VARCHAR(36) NOT NULL, - Type SMALLINT DEFAULT NULL, - Version INT DEFAULT NULL, - ParentID VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner); -CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID); - -CREATE TABLE InventoryItems ( - ID VARCHAR(36) NOT NULL, - InvType INT DEFAULT NULL, - AssetType INT DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - Folder VARCHAR(36) DEFAULT NULL, - Owner VARCHAR(36) DEFAULT NULL, - Creator VARCHAR(36) DEFAULT NULL, - Name VARCHAR(64) DEFAULT NULL, - Description VARCHAR(64) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryOnePermissions INT DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - GroupOwned BIT DEFAULT NULL, - SalePrice INT DEFAULT NULL, - SaleType TINYINT DEFAULT NULL, - Flags INT DEFAULT NULL, - CreationDate INT DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID); -CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner); -CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder); diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql deleted file mode 100644 index 2b8e62a..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql +++ /dev/null @@ -1,168 +0,0 @@ -CREATE TABLE Prims ( - UUID VARCHAR(36) NOT NULL, - RegionID VARCHAR(36) DEFAULT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - ParentID INT DEFAULT NULL, - ParentUUID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate INT DEFAULT NULL, - LinkNum INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Text VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - SitName VARCHAR(255) DEFAULT NULL, - TouchName VARCHAR(255) DEFAULT NULL, - ObjectFlags INT DEFAULT NULL, - OwnerMask INT DEFAULT NULL, - NextOwnerMask INT DEFAULT NULL, - GroupMask INT DEFAULT NULL, - EveryoneMask INT DEFAULT NULL, - BaseMask INT DEFAULT NULL, - Material TINYINT DEFAULT NULL, - ScriptAccessPin INT DEFAULT NULL, - TextureAnimation BLOB, - ParticleSystem BLOB, - ClickAction TINYINT DEFAULT NULL, - Color INT DEFAULT NULL, - PositionX DOUBLE DEFAULT NULL, - PositionY DOUBLE DEFAULT NULL, - PositionZ DOUBLE DEFAULT NULL, - GroupPositionX DOUBLE DEFAULT NULL, - GroupPositionY DOUBLE DEFAULT NULL, - GroupPositionZ DOUBLE DEFAULT NULL, - VelocityX DOUBLE DEFAULT NULL, - VelocityY DOUBLE DEFAULT NULL, - VelocityZ DOUBLE DEFAULT NULL, - AngularVelocityX DOUBLE DEFAULT NULL, - AngularVelocityY DOUBLE DEFAULT NULL, - AngularVelocityZ DOUBLE DEFAULT NULL, - AccelerationX DOUBLE DEFAULT NULL, - AccelerationY DOUBLE DEFAULT NULL, - AccelerationZ DOUBLE DEFAULT NULL, - RotationX DOUBLE DEFAULT NULL, - RotationY DOUBLE DEFAULT NULL, - RotationZ DOUBLE DEFAULT NULL, - RotationW DOUBLE DEFAULT NULL, - SitTargetOffsetX DOUBLE DEFAULT NULL, - SitTargetOffsetY DOUBLE DEFAULT NULL, - SitTargetOffsetZ DOUBLE DEFAULT NULL, - SitTargetOrientW DOUBLE DEFAULT NULL, - SitTargetOrientX DOUBLE DEFAULT NULL, - SitTargetOrientY DOUBLE DEFAULT NULL, - SitTargetOrientZ DOUBLE DEFAULT NULL, - -- this is the shape - Shape INT DEFAULT NULL, - ScaleX DOUBLE DEFAULT NULL, - ScaleY DOUBLE DEFAULT NULL, - ScaleZ DOUBLE DEFAULT NULL, - PCode INT DEFAULT NULL, - PathBegin INT DEFAULT NULL, - PathEnd INT DEFAULT NULL, - PathScaleX INT DEFAULT NULL, - PathScaleY INT DEFAULT NULL, - PathShearX INT DEFAULT NULL, - PathShearY INT DEFAULT NULL, - PathSkew INT DEFAULT NULL, - PathCurve INT DEFAULT NULL, - PathRadiusOffset INT DEFAULT NULL, - PathRevolutions INT DEFAULT NULL, - PathTaperX INT DEFAULT NULL, - PathTaperY INT DEFAULT NULL, - PathTwist INT DEFAULT NULL, - ProfileBegin INT DEFAULT NULL, - ProfileEnd INT DEFAULT NULL, - ProfileCurve INT DEFAULT NULL, - ProfileHollow INT DEFAULT NULL, - State INT DEFAULT NULL, - Texture BLOB, - ExtraParams BLOB, - PRIMARY KEY (UUID) -); - -CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID); -CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID); - -CREATE TABLE Terrain ( - RegionID VARCHAR(36) NOT NULL, - MapData BLOB, - PRIMARY KEY (RegionID) -); - -CREATE TABLE PrimItems ( - ItemID VARCHAR(36) NOT NULL, - GroupID VARCHAR(36) DEFAULT NULL, - PrimID VARCHAR(36) DEFAULT NULL, - ParentFolderID VARCHAR(36) DEFAULT NULL, - AssetID VARCHAR(36) DEFAULT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - LastOwnerID VARCHAR(36) DEFAULT NULL, - CreatorID VARCHAR(36) DEFAULT NULL, - CreationDate BIGINT DEFAULT NULL, - Type INT DEFAULT NULL, - InvType INT DEFAULT NULL, - Name VARCHAR(255) DEFAULT NULL, - Description VARCHAR(255) DEFAULT NULL, - NextPermissions INT DEFAULT NULL, - CurrentPermissions INT DEFAULT NULL, - BasePermissions INT DEFAULT NULL, - EveryonePermissions INT DEFAULT NULL, - GroupPermissions INT DEFAULT NULL, - Flags INT DEFAULT NULL, - PRIMARY KEY (ItemID) -); - -CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID); - -CREATE TABLE RegionSettings ( - RegionID VARCHAR(36) NOT NULL, - - BlockTerraform BIT DEFAULT NULL, - BlockFly BIT DEFAULT NULL, - AllowDamage BIT DEFAULT NULL, - RestrictPushing BIT DEFAULT NULL, - AllowLandResell BIT DEFAULT NULL, - AllowLandJoinDivide BIT DEFAULT NULL, - BlockShowInSearch BIT DEFAULT NULL, - - AgentLimit INT DEFAULT NULL, - ObjectBonus DOUBLE DEFAULT NULL, - Maturity INT DEFAULT NULL, - - DisableScripts BIT DEFAULT NULL, - DisableCollisions BIT DEFAULT NULL, - DisablePhysics BIT DEFAULT NULL, - - TerrainTexture1 VARCHAR(36) DEFAULT NULL, - TerrainTexture2 VARCHAR(36) DEFAULT NULL, - TerrainTexture3 VARCHAR(36) DEFAULT NULL, - TerrainTexture4 VARCHAR(36) DEFAULT NULL, - - Elevation1NW DOUBLE DEFAULT NULL, - Elevation2NW DOUBLE DEFAULT NULL, - Elevation1NE DOUBLE DEFAULT NULL, - Elevation2NE DOUBLE DEFAULT NULL, - Elevation1SE DOUBLE DEFAULT NULL, - Elevation2SE DOUBLE DEFAULT NULL, - Elevation1SW DOUBLE DEFAULT NULL, - Elevation2SW DOUBLE DEFAULT NULL, - - WaterHeight DOUBLE DEFAULT NULL, - TerrainRaiseLimit DOUBLE DEFAULT NULL, - TerrainLowerLimit DOUBLE DEFAULT NULL, - - UseEstateSun BIT DEFAULT NULL, - Sandbox BIT DEFAULT NULL, - - SunVectorX DOUBLE DEFAULT NULL, - SunVectorY DOUBLE DEFAULT NULL, - SunVectorZ DOUBLE DEFAULT NULL, - - FixedSun BIT DEFAULT NULL, - SunPosition DOUBLE DEFAULT NULL, - - Covenant VARCHAR(36) DEFAULT NULL, - - PRIMARY KEY (RegionID) -); diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql deleted file mode 100644 index 6084886..0000000 --- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql +++ /dev/null @@ -1,104 +0,0 @@ -CREATE TABLE UserAgents ( - ProfileID VARCHAR(36) NOT NULL, - AgentIP VARCHAR(24) DEFAULT NULL, - AgentPort INT DEFAULT NULL, - AgentOnline BIT DEFAULT NULL, - SessionID VARCHAR(36) DEFAULT NULL, - SecureSessionID VARCHAR(36) DEFAULT NULL, - InitialRegion VARCHAR(255) DEFAULT NULL, - Region VARCHAR(255) DEFAULT NULL, - LoginTime INT DEFAULT NULL, - LogoutTime INT DEFAULT NULL, - Handle BIGINT DEFAULT NULL, - PositionX DOUBLE DEFAULT NULL, - PositionY DOUBLE DEFAULT NULL, - PositionZ DOUBLE DEFAULT NULL, - LookAtX DOUBLE DEFAULT NULL, - LookAtY DOUBLE DEFAULT NULL, - LookAtZ DOUBLE DEFAULT NULL, - PRIMARY KEY (ProfileID) -); - -CREATE TABLE UserProfiles ( - ID VARCHAR(36) NOT NULL, - WebLoginKey VARCHAR(36) DEFAULT NULL, - FirstName VARCHAR(32) DEFAULT NULL, - SurName VARCHAR(32) DEFAULT NULL, - Email VARCHAR(250) DEFAULT NULL, - PasswordHash VARCHAR(32) DEFAULT NULL, - PasswordSalt VARCHAR(32) DEFAULT NULL, - HomeRegionID VARCHAR(36) DEFAULT NULL, - HomeRegionX INT DEFAULT NULL, - HomeRegionY INT DEFAULT NULL, - HomeLocationX DOUBLE DEFAULT NULL, - HomeLocationY DOUBLE DEFAULT NULL, - HomeLocationZ DOUBLE DEFAULT NULL, - HomeLookAtX DOUBLE DEFAULT NULL, - HomeLookAtY DOUBLE DEFAULT NULL, - HomeLookAtZ DOUBLE DEFAULT NULL, - Created INT DEFAULT NULL, - LastLogin INT DEFAULT NULL, - UserInventoryURI VARCHAR(255) DEFAULT NULL, - UserAssetURI VARCHAR(255) DEFAULT NULL, - Image VARCHAR(36) DEFAULT NULL, - FirstLifeImage VARCHAR(36) DEFAULT NULL, - AboutText TEXT DEFAULT NULL, - FirstLifeAboutText TEXT DEFAULT NULL, - CanDoMask INT DEFAULT NULL, - WantDoMask INT DEFAULT NULL, - UserFlags INT DEFAULT NULL, - GodLevel INT DEFAULT NULL, - CustomType VARCHAR(32) DEFAULT NULL, - Partner VARCHAR(36) DEFAULT NULL, - RootInventoryFolderID VARCHAR(36) DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE INDEX UserSurnameIndex ON UserProfiles (SurName); -CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName); -CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName); - -CREATE TABLE UserAppearances ( - Owner VARCHAR(36) NOT NULL, - BodyItem VARCHAR(36) DEFAULT NULL, - BodyAsset VARCHAR(36) DEFAULT NULL, - SkinItem VARCHAR(36) DEFAULT NULL, - SkinAsset VARCHAR(36) DEFAULT NULL, - HairItem VARCHAR(36) DEFAULT NULL, - HairAsset VARCHAR(36) DEFAULT NULL, - EyesItem VARCHAR(36) DEFAULT NULL, - EyesAsset VARCHAR(36) DEFAULT NULL, - ShirtItem VARCHAR(36) DEFAULT NULL, - ShirtAsset VARCHAR(36) DEFAULT NULL, - PantsItem VARCHAR(36) DEFAULT NULL, - PantsAsset VARCHAR(36) DEFAULT NULL, - ShoesItem VARCHAR(36) DEFAULT NULL, - ShoesAsset VARCHAR(36) DEFAULT NULL, - SocksItem VARCHAR(36) DEFAULT NULL, - SocksAsset VARCHAR(36) DEFAULT NULL, - JacketItem VARCHAR(36) DEFAULT NULL, - JacketAsset VARCHAR(36) DEFAULT NULL, - GlovesItem VARCHAR(36) DEFAULT NULL, - GlovesAsset VARCHAR(36) DEFAULT NULL, - UnderShirtItem VARCHAR(36) DEFAULT NULL, - UnderShirtAsset VARCHAR(36) DEFAULT NULL, - UnderPantsItem VARCHAR(36) DEFAULT NULL, - UnderPantsAsset VARCHAR(36) DEFAULT NULL, - SkirtItem VARCHAR(36) DEFAULT NULL, - SkirtAsset VARCHAR(36) DEFAULT NULL, - Texture BLOB, - VisualParams BLOB, - Serial INT DEFAULT NULL, - AvatarHeight FLOAT DEFAULT NULL, - PRIMARY KEY (Owner) -); - -CREATE TABLE UserFriends ( - UserFriendID VARCHAR(36) NOT NULL, - OwnerID VARCHAR(36) DEFAULT NULL, - FriendID VARCHAR(36) DEFAULT NULL, - FriendPermissions INT DEFAULT NULL, - PRIMARY KEY (UserFriendID) -); - -CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID); diff --git a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml deleted file mode 100644 index 70b6998..0000000 --- a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml deleted file mode 100644 index 21e547f..0000000 --- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml deleted file mode 100644 index cb23858..0000000 --- a/OpenSim/Data/NHibernate/Resources/UserFriend.hbm.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml deleted file mode 100644 index 5b1f9b0..0000000 --- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Data/NHibernate/SByteType.cs b/OpenSim/Data/NHibernate/SByteType.cs deleted file mode 100644 index 92ab0ba..0000000 --- a/OpenSim/Data/NHibernate/SByteType.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class SByteType: IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object sbyte1, object sbyte2) - { - return sbyte1.Equals(sbyte2); - } - - public object DeepCopy(object sbyte1) - { - return sbyte1; - } - - public object Disassemble(object sbyte1) - { - return sbyte1; - } - - public int GetHashCode(object sbyte1) - { - return (sbyte1 == null) ? 0 : sbyte1.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object sbyte1 = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - object tempO = rs.GetValue(ord); - if (tempO is Byte) - { - sbyte1 = Convert.ToSByte(((byte)tempO)); - } - else - { - short temp = rs.GetInt16(ord); - sbyte1 = Convert.ToSByte(temp); - } - } - return sbyte1; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - sbyte b = (sbyte)obj; - ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt16(b); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(sbyte); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Byte.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/Terrain.cs b/OpenSim/Data/NHibernate/Terrain.cs deleted file mode 100644 index 4be35c6..0000000 --- a/OpenSim/Data/NHibernate/Terrain.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using System.Reflection; -using log4net; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - public class Terrain - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private double[,] map; - private UUID regionID; - - public Terrain(UUID Region, double[,] array) - { - map = array; - regionID = Region; - } - - public Terrain() - { - map = new double[Constants.RegionSize, Constants.RegionSize]; - map.Initialize(); - regionID = UUID.Zero; - } - - public UUID RegionID - { - get { return regionID; } - set { regionID = value; } - } - - public byte[] MapData - { - get { return serializeTerrain(map); } - set { map = parseTerrain(value); } - } - - public double[,] Doubles - { - get {return map;} - set {map = value;} - } - - private static double[,] parseTerrain(byte[] data) - { - double[,] terret = new double[Constants.RegionSize, Constants.RegionSize]; - terret.Initialize(); - - MemoryStream str = new MemoryStream(data); - BinaryReader br = new BinaryReader(str); - try { - for (int x = 0; x < Constants.RegionSize; x++) - { - for (int y = 0; y < Constants.RegionSize; y++) - { - terret[x, y] = br.ReadDouble(); - } - } - } - catch (Exception e) - { - m_log.Error("Issue parsing Map", e); - } - return terret; - } - - private static byte[] serializeTerrain(double[,] val) - { - MemoryStream str = new MemoryStream((int) ((Constants.RegionSize*Constants.RegionSize)*sizeof (double))); - BinaryWriter bw = new BinaryWriter(str); - - // TODO: COMPATIBILITY - Add byte-order conversions - for (int x = 0; x < Constants.RegionSize; x++) - { - for (int y = 0; y < Constants.RegionSize; y++) - { - double height = val[x, y]; - if (height <= 0.0) - height = double.Epsilon; - - bw.Write(height); - } - } - return str.ToArray(); - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs deleted file mode 100644 index 89c9567..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlAssetTest.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlAssetTest : BasicAssetTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - db = new NHibernateAssetData(); - db.Initialise(connect); - database = ((NHibernateAssetData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs deleted file mode 100644 index 6d431a7..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlEstateTest.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlEstateTest : BasicEstateTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "MsSql2005Dialect;SqlClientDriver;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - db = new NHibernateEstateData(); - db.Initialise(connect); - database = ((NHibernateEstateData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - ((NHibernateEstateData)db).Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs deleted file mode 100644 index 30280af..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlGridTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlGridTest : BasicGridTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateGridData(); - db.Initialise(connect); - database = ((NHibernateGridData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs deleted file mode 100644 index 6d60006..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlInventoryTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlInventoryTest : BasicInventoryTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateInventoryData(); - db.Initialise(connect); - database = ((NHibernateInventoryData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs deleted file mode 100644 index 9a9c41d..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlRegionTest.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlRegionTest : BasicRegionTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateRegionData(); - db.Initialise(connect); - database = ((NHibernateRegionData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs deleted file mode 100644 index cd861de..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMsSqlUserTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMsSqlUserTest : BasicUserTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateUserData(); - db.Initialise(connect); - database = ((NHibernateUserData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs deleted file mode 100644 index 7c7b5f7..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLAssetTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLAssetTest : BasicAssetTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateAssetData(); - db.Initialise(connect); - database = ((NHibernateAssetData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs deleted file mode 100644 index dbb1d14..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLGridTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLGridTest : BasicGridTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateGridData(); - db.Initialise(connect); - database = ((NHibernateGridData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs deleted file mode 100644 index 6c31a63..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLInventoryTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLInventoryTest : BasicInventoryTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateInventoryData(); - db.Initialise(connect); - database = ((NHibernateInventoryData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs deleted file mode 100644 index 28660d9..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLRegionTest.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLRegionTest : BasicRegionTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateRegionData(); - db.Initialise(connect); - database = ((NHibernateRegionData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs deleted file mode 100644 index d5caa3e..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySQLUserTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLUserTest : BasicUserTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateUserData(); - db.Initialise(connect); - database = ((NHibernateUserData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs deleted file mode 100644 index 72b4320..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateMySqlEstateTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateMySQLEstateTest : BasicEstateTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "MySQL5Dialect;MySqlDataDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateEstateData(); - db.Initialise(connect); - database = ((NHibernateEstateData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - ((NHibernateEstateData)db).Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs deleted file mode 100644 index d1ec3d0..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLAssetTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLAssetTest : BasicAssetTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateAssetData(); - db.Initialise(connect); - database = ((NHibernateAssetData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs deleted file mode 100644 index fdd99ab..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLEstateTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLEstateTest : BasicEstateTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateEstateData(); - db.Initialise(connect); - database = ((NHibernateEstateData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - ((NHibernateEstateData)db).Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs deleted file mode 100644 index fe874cb..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLGridTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLGridTest : BasicGridTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateGridData(); - db.Initialise(connect); - database = ((NHibernateGridData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs deleted file mode 100644 index 048d36f..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLInventoryTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLInventoryTest : BasicInventoryTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateInventoryData(); - db.Initialise(connect); - database = ((NHibernateInventoryData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs deleted file mode 100644 index 76b6fea..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLRegionTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLRegionTest : BasicRegionTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateRegionData(); - db.Initialise(connect); - database = ((NHibernateRegionData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs deleted file mode 100644 index c437cd8..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernatePostgreSQLUserTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernatePostgreSQLUserTest : BasicUserTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "PostgreSQLDialect;NpgsqlDriver;Server=localhost;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateUserData(); - db.Initialise(connect); - database = ((NHibernateUserData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs deleted file mode 100644 index c8d6e75..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteAssetTest.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateSQLiteAssetTest : BasicAssetTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - db = new NHibernateAssetData(); - db.Initialise(connect); - database = ((NHibernateAssetData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs deleted file mode 100644 index 345db84..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteEstateTest.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateSQLiteEstateTest : BasicEstateTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - db = new NHibernateEstateData(); - db.Initialise(connect); - database = ((NHibernateEstateData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - ((NHibernateEstateData)db).Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs deleted file mode 100644 index 24a19c9..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteGridTest.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateSQLiteGridTest : BasicGridTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - public string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - db = new NHibernateGridData(); - db.Initialise(connect); - database = ((NHibernateGridData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs deleted file mode 100644 index ec15c55..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteInventoryTest.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateSQLiteInventoryTest : BasicInventoryTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - db = new NHibernateInventoryData(); - db.Initialise(connect); - database = ((NHibernateInventoryData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs deleted file mode 100644 index 692ba5a..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteRegionTest.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - [TestFixture, DatabaseTest] - public class NHibernateSQLiteRegionTest : BasicRegionTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - db = new NHibernateRegionData(); - db.Initialise(connect); - database = ((NHibernateRegionData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - - } -} diff --git a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs b/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs deleted file mode 100644 index 32a5bbe..0000000 --- a/OpenSim/Data/NHibernate/Tests/NHibernateSQLiteUserTest.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using NUnit.Framework; -using OpenSim.Data.Tests; -using log4net; -using System.Reflection; -using OpenSim.Tests.Common; - -namespace OpenSim.Data.NHibernate.Tests -{ - - [TestFixture, DatabaseTest] - public class NHibernateSQLiteUserTest : BasicUserTest - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string file; - public NHibernateManager database; - - [TestFixtureSetUp] - public void Init() - { - SuperInit(); - // If we manage to connect to the database with the user - // and password above it is our test database, and run - // these tests. If anything goes wrong, ignore these - // tests. - try - { - string connect = "SQLiteDialect;SQLite20Driver;Data Source=" + Path.GetTempFileName() + ".db;Version=3"; - - db = new NHibernateUserData(); - db.Initialise(connect); - database = ((NHibernateUserData)db).Manager; - } - catch (Exception e) - { - m_log.Error(e.ToString()); - Assert.Ignore(); - } - } - - [TestFixtureTearDown] - public void Cleanup() - { - if (db != null) - { - db.Dispose(); - } - if (database != null) - { - database.DropSchema(); - } - } - } -} diff --git a/OpenSim/Data/NHibernate/TextureUserType.cs b/OpenSim/Data/NHibernate/TextureUserType.cs deleted file mode 100644 index 57a5296..0000000 --- a/OpenSim/Data/NHibernate/TextureUserType.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; -using OpenMetaverse; -using OpenSim.Framework; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class TextureUserType: IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object texture1, object texture2) - { - return texture1.Equals(texture2); - } - - public object DeepCopy(object texture) - { - if (texture == null) - { - // TODO: should parametrize this texture out - return new Primitive.TextureEntry(new UUID(Constants.DefaultTexture)); - } - else - { - byte[] bytes = ((Primitive.TextureEntry)texture).GetBytes(); - return new Primitive.TextureEntry(bytes, 0, bytes.Length); - } - } - - public object Disassemble(object texture) - { - return texture; - } - - public int GetHashCode(object texture) - { - return (texture == null) ? 0 : texture.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object texture = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - byte[] bytes = (byte[])rs[ord]; - texture = new Primitive.TextureEntry(bytes, 0, bytes.Length); - } - - return texture; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - Primitive.TextureEntry texture = (Primitive.TextureEntry)obj; - ((IDataParameter)cmd.Parameters[index]).Value = texture.GetBytes(); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(Primitive.TextureEntry); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Binary.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/UInt16Type.cs b/OpenSim/Data/NHibernate/UInt16Type.cs deleted file mode 100644 index 8e17463..0000000 --- a/OpenSim/Data/NHibernate/UInt16Type.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class UInt16Type : IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object uint1, object uint2) - { - return uint1.Equals(uint2); - } - - public object DeepCopy(object uint1) - { - return uint1; - } - - public object Disassemble(object uint1) - { - return uint1; - } - - public int GetHashCode(object uint1) - { - return (uint1 == null) ? 0 : uint1.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object uint1 = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - uint1 = (UInt16)rs.GetInt32(ord); - } - - return uint1; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - UInt16 uint1 = (UInt16)obj; - ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(UInt16); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/UInt32Type.cs b/OpenSim/Data/NHibernate/UInt32Type.cs deleted file mode 100644 index 6b1cb36..0000000 --- a/OpenSim/Data/NHibernate/UInt32Type.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class UInt32Type : IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object uint1, object uint2) - { - return uint1.Equals(uint2); - } - - public object DeepCopy(object uint1) - { - return uint1; - } - - public object Disassemble(object uint1) - { - return uint1; - } - - public int GetHashCode(object uint1) - { - return (uint1 == null) ? 0 : uint1.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object uint1 = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - uint1 = (UInt32)rs.GetInt32(ord); - } - - return uint1; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - UInt32 uint1 = (UInt32)obj; - ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt32(uint1); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(UInt32); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Int32.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/UInt64Type.cs b/OpenSim/Data/NHibernate/UInt64Type.cs deleted file mode 100644 index 6484367..0000000 --- a/OpenSim/Data/NHibernate/UInt64Type.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Data; -using NHibernate; -using NHibernate.SqlTypes; -using NHibernate.UserTypes; - -namespace OpenSim.Data.NHibernate -{ - [Serializable] - public class UInt64Type : IUserType - { - public object Assemble(object cached, object owner) - { - return cached; - } - - bool IUserType.Equals(object uint1, object uint2) - { - return uint1.Equals(uint2); - } - - public object DeepCopy(object uint1) - { - return uint1; - } - - public object Disassemble(object uint1) - { - return uint1; - } - - public int GetHashCode(object uint1) - { - return (uint1 == null) ? 0 : uint1.GetHashCode(); - } - - public bool IsMutable - { - get { return false; } - } - - public object NullSafeGet(IDataReader rs, string[] names, object owner) - { - object uint1 = null; - - int ord = rs.GetOrdinal(names[0]); - if (!rs.IsDBNull(ord)) - { - uint1 = (UInt64)rs.GetInt64(ord); - } - - return uint1; - } - - public void NullSafeSet(IDbCommand cmd, object obj, int index) - { - UInt64 uint1 = (UInt64)obj; - ((IDataParameter)cmd.Parameters[index]).Value = Convert.ToInt64(uint1); - } - - public object Replace(object original, object target, object owner) - { - return original; - } - - public Type ReturnedType - { - get { return typeof(UInt64); } - } - - public SqlType[] SqlTypes - { - get { return new SqlType [] { NHibernateUtil.Int64.SqlType }; } - } - } -} diff --git a/OpenSim/Data/NHibernate/UserFriend.cs b/OpenSim/Data/NHibernate/UserFriend.cs deleted file mode 100644 index f0868a1..0000000 --- a/OpenSim/Data/NHibernate/UserFriend.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using OpenMetaverse; - -namespace OpenSim.Data.NHibernate -{ - public class UserFriend - { - public UserFriend() - { - } - - public UserFriend(UUID userFriendID, UUID ownerID, UUID friendID, uint friendPermissions) - { - this.UserFriendID = userFriendID; - this.OwnerID = ownerID; - this.FriendID = friendID; - this.FriendPermissions = friendPermissions; - } - - private UUID userFriendId; - public UUID UserFriendID - { - get { return userFriendId; } - set { userFriendId = value; } - } - private UUID ownerId; - public UUID OwnerID - { - get { return ownerId; } - set { ownerId = value; } - } - private UUID friendId; - public UUID FriendID - { - get { return friendId; } - set { friendId = value; } - } - private uint friendPermissions; - public uint FriendPermissions - { - get { return friendPermissions; } - set { friendPermissions = value; } - } - - } -} diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index 97990e1..60a8874 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs @@ -323,7 +323,6 @@ namespace OpenSim.Data.Tests sop.ObjectFlags = 0; SceneObjectGroup sog = new SceneObjectGroup(sop); - sog.SetScene(scene); // Reguired by nhibernate database module. // Inserts group in DB db.StoreObject(sog,region3); diff --git a/OpenSim/Data/Tests/DataTestUtil.cs b/OpenSim/Data/Tests/DataTestUtil.cs index f781ea6..d211ab3 100644 --- a/OpenSim/Data/Tests/DataTestUtil.cs +++ b/OpenSim/Data/Tests/DataTestUtil.cs @@ -39,7 +39,7 @@ namespace OpenSim.Data.Tests public class DataTestUtil { public const uint UNSIGNED_INTEGER_MIN = uint.MinValue; - public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue / 2; // NHibernate does not support unsigned integer range. + public const uint UNSIGNED_INTEGER_MAX = uint.MaxValue; public const int INTEGER_MIN = int.MinValue + 1; // Postgresql requires +1 to .NET int.MinValue public const int INTEGER_MAX = int.MaxValue; -- cgit v1.1