* Removed OpenSim.Data.NHibernate
* Replaced calls to ThreadPool.QueueUserWorkItem() with ThreadPool.UnsafeQueueUserWorkItem() since OpenSim does not use Code Access Security sandboxingprioritization
parent
72078195c2
commit
fdce1be3db
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.
|
|
@ -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 '%-%';
|
|
@ -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 = <SQLITE>) {
|
||||
$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);
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// A User storage interface for the DB4o database system
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of AssetMetadata objects. The list is a subset of
|
||||
/// the entire data set offset by <paramref name="start" /> containing
|
||||
/// <paramref name="count" /> elements.
|
||||
/// </summary>
|
||||
/// <param name="start">The number of results to discard from the total data set.</param>
|
||||
/// <param name="count">The number of rows the returned list should contain.</param>
|
||||
/// <returns>A list of AssetMetadata objects.</returns>
|
||||
public override List<AssetMetadata> FetchAssetMetadataSet(int start, int count)
|
||||
{
|
||||
List<AssetMetadata> retList = new List<AssetMetadata>(count);
|
||||
return retList;
|
||||
}
|
||||
|
||||
public void DeleteAsset(UUID uuid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return "NHibernate"; }
|
||||
}
|
||||
|
||||
public override string Version {
|
||||
get { return "0.1"; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// A User storage interface for the DB4o database system
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// A GridData Interface to the NHibernate database
|
||||
/// </summary>
|
||||
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() { }
|
||||
|
||||
/// <summary>
|
||||
/// The plugin being loaded
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin name</returns>
|
||||
public override string Name
|
||||
{
|
||||
get { return "NHibernate Grid Data Interface"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugins version
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin version</returns>
|
||||
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<regionArray.Length;i++)
|
||||
{
|
||||
regionArray[i] = (RegionProfileData)regions[i];
|
||||
}
|
||||
|
||||
return regionArray;
|
||||
}
|
||||
}
|
||||
|
||||
public override List<RegionProfileData> 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<RegionProfileData> regionList = new List<RegionProfileData>();
|
||||
|
||||
foreach (RegionProfileData regionProfileData in regions)
|
||||
{
|
||||
regionList.Add(regionProfileData);
|
||||
}
|
||||
|
||||
return regionList;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugin being loaded
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin name</returns>
|
||||
public string Name
|
||||
{
|
||||
get { return "NHibernate Inventory Data Interface"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The plugins version
|
||||
/// </summary>
|
||||
/// <returns>A string containing the plugin version</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialises the interface
|
||||
/// </summary>
|
||||
public void Initialise(string connect)
|
||||
{
|
||||
m_log.InfoFormat("[NHIBERNATE] Initializing NHibernateInventoryData");
|
||||
manager = new NHibernateManager(connect, "InventoryStore");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the interface
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
*
|
||||
* Basic CRUD operations on Data
|
||||
*
|
||||
****************************************************************/
|
||||
|
||||
// READ
|
||||
|
||||
/// <summary>
|
||||
/// Returns an inventory item by its UUID
|
||||
/// </summary>
|
||||
/// <param name="item">The UUID of the item to be returned</param>
|
||||
/// <returns>A class containing item information</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new inventory item based on item
|
||||
/// </summary>
|
||||
/// <param name="item">The item to be created</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an inventory item with item (updates based on ID)
|
||||
/// </summary>
|
||||
/// <param name="item">The updated item</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an inventory folder by its UUID
|
||||
/// </summary>
|
||||
/// <param name="folder">The UUID of the folder to be returned</param>
|
||||
/// <returns>A class containing folder information</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new inventory folder based on folder
|
||||
/// </summary>
|
||||
/// <param name="folder">The folder to be created</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates an inventory folder with folder (updates based on ID)
|
||||
/// </summary>
|
||||
/// <param name="folder">The updated folder</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="folder"></param>
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory items contained within the specified folder
|
||||
/// </summary>
|
||||
/// <param name="folderID">The UUID of the target folder</param>
|
||||
/// <returns>A List of InventoryItemBase items</returns>
|
||||
public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
|
||||
{
|
||||
// try {
|
||||
ICriteria criteria = manager.GetSession().CreateCriteria(typeof(InventoryItemBase));
|
||||
criteria.Add(Expression.Eq("Folder", folderID));
|
||||
List<InventoryItemBase> list = new List<InventoryItemBase>();
|
||||
foreach (InventoryItemBase item in criteria.List())
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
return list;
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// return new List<InventoryItemBase>();
|
||||
// }
|
||||
}
|
||||
|
||||
public List<InventoryFolderBase> getUserRootFolders(UUID user)
|
||||
{
|
||||
return new List<InventoryFolderBase>();
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a list of all the child folders of a parent folder
|
||||
/// </summary>
|
||||
/// <param name="folders">list where folders will be appended</param>
|
||||
/// <param name="parentID">ID of parent</param>
|
||||
private void getInventoryFolders(ref List<InventoryFolderBase> 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory folders contained in the folder 'parentID'
|
||||
/// </summary>
|
||||
/// <param name="parentID">The folder to get subfolders for</param>
|
||||
/// <returns>A list of inventory folders</returns>
|
||||
public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
|
||||
{
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
getInventoryFolders(ref folders, parentID);
|
||||
return folders;
|
||||
}
|
||||
|
||||
// See IInventoryDataPlugin
|
||||
public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
|
||||
{
|
||||
if (parentID == UUID.Zero)
|
||||
{
|
||||
// Zero UUID is not a real parent folder.
|
||||
return new List<InventoryFolderBase>();
|
||||
}
|
||||
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
|
||||
getInventoryFolders(ref folders, parentID);
|
||||
|
||||
for (int i = 0; i < folders.Count; i++)
|
||||
getInventoryFolders(ref folders, folders[i].ID);
|
||||
|
||||
return folders;
|
||||
}
|
||||
|
||||
public List<InventoryItemBase> fetchActiveGestures (UUID avatarID)
|
||||
{
|
||||
return 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
|
||||
|
||||
/// <summary>
|
||||
/// Initiate NHibernate Manager
|
||||
/// </summary>
|
||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
||||
/// <param name="store">Name of the store</param>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiate NHibernate Manager with spesific assembly
|
||||
/// </summary>
|
||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
||||
/// <param name="store">Name of the store</param>
|
||||
/// <param name="assembly">Outside assembly to be included </param>
|
||||
public NHibernateManager(string connect, string store, Assembly assembly)
|
||||
{
|
||||
ParseConnectionString(connect);
|
||||
|
||||
configuration.AddAssembly(assembly);
|
||||
sessionFactory = configuration.BuildSessionFactory();
|
||||
RunMigration(dialect, assembly, store);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses the connection string and creates the NHibernate configuration
|
||||
/// </summary>
|
||||
/// <param name="connect">NHibernate dialect, driver and connection string separated by ';'</param>
|
||||
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");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs migration for the the store in assembly
|
||||
/// </summary>
|
||||
/// <param name="dialect">Dialect in use</param>
|
||||
/// <param name="assembly">Assembly where migration files exist</param>
|
||||
/// <param name="store">Name of the store in use</param>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Gets object of given type from database with given id.
|
||||
/// Uses stateless session for efficiency.
|
||||
/// </summary>
|
||||
/// <param name="type">Type of the object.</param>
|
||||
/// <param name="id">Id of the object.</param>
|
||||
/// <returns>The object or null if object was not found.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="type">Type of the object.</param>
|
||||
/// <param name="id">Id of the object.</param>
|
||||
/// <returns>The object or null if object was not found.</returns>
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts given object to database.
|
||||
/// Uses stateless session for efficiency.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be insterted.</param>
|
||||
/// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts given object to database.
|
||||
/// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be insterted.</param>
|
||||
/// <returns>Identifier of the object. Useful for situations when NHibernate generates the identifier.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates given object to database.
|
||||
/// Uses stateless session for efficiency.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be updated.</param>
|
||||
/// <returns>True if operation was succesful.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates given object to database.
|
||||
/// Use this method for objects containing collections. For flat objects stateless mode is more efficient.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be updated.</param>
|
||||
/// <returns>True if operation was succesful.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes given object from database.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be deleted.</param>
|
||||
/// <returns>True if operation was succesful.</returns>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns statefull session which can be used to execute custom nhibernate or sql queries.
|
||||
/// </summary>
|
||||
/// <returns>Statefull session</returns>
|
||||
public ISession GetSession()
|
||||
{
|
||||
return sessionFactory.OpenSession();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drops the database schema. This exist for unit tests. It should not be invoked from other than test teardown.
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// A RegionData Interface to the NHibernate database
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds an object into region storage
|
||||
/// </summary>
|
||||
/// <param name="obj">the object</param>
|
||||
/// <param name="regionUUID">the region UUID</param>
|
||||
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<SceneObjectPart> parts = criteria.List<SceneObjectPart>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an object from region storage
|
||||
/// </summary>
|
||||
/// <param name="obj">the object</param>
|
||||
/// <param name="regionUUID">the region UUID</param>
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load persisted objects from region storage.
|
||||
/// </summary>
|
||||
/// <param name="regionUUID">The region UUID</param>
|
||||
/// <returns>List of loaded groups</returns>
|
||||
public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
|
||||
{
|
||||
Dictionary<UUID, SceneObjectGroup> SOG = new Dictionary<UUID, SceneObjectGroup>();
|
||||
List<SceneObjectGroup> ret = new List<SceneObjectGroup>();
|
||||
|
||||
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<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Store a terrain revision in region storage
|
||||
/// </summary>
|
||||
/// <param name="ter">terrain heightfield</param>
|
||||
/// <param name="regionID">region UUID</param>
|
||||
public void StoreTerrain(double[,] ter, UUID regionID)
|
||||
{
|
||||
lock (this) {
|
||||
Terrain t = new Terrain(regionID, ter);
|
||||
SaveOrUpdate(t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the latest terrain revision from region storage
|
||||
/// </summary>
|
||||
/// <param name="regionID">the region UUID</param>
|
||||
/// <returns>Heightfield data</returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="globalID"></param>
|
||||
public void RemoveLandObject(UUID globalID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="parcel"></param>
|
||||
public void StoreLandObject(ILandObject parcel)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="regionUUID"></param>
|
||||
/// <returns></returns>
|
||||
public List<LandData> LoadLandObjects(UUID regionUUID)
|
||||
{
|
||||
List<LandData> landDataForRegion = new List<LandData>();
|
||||
|
||||
return landDataForRegion;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// See <see cref="Commit"/>
|
||||
/// </summary>
|
||||
public void Shutdown()
|
||||
{
|
||||
//session.Flush();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load a region banlist
|
||||
/// </summary>
|
||||
/// <param name="regionUUID">the region UUID</param>
|
||||
/// <returns>The banlist</returns>
|
||||
public List<EstateBan> LoadRegionBanList(UUID regionUUID)
|
||||
{
|
||||
List<EstateBan> regionbanlist = new List<EstateBan>();
|
||||
|
||||
return regionbanlist;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add en entry into region banlist
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
public void AddToRegionBanlist(EstateBan item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// remove an entry from the region banlist
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
public void RemoveFromRegionBanlist(EstateBan item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="val"></param>
|
||||
/// <returns></returns>
|
||||
// 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();
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// see IRegionDatastore
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <param name="items"></param>
|
||||
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// A User storage interface for the DB4o database system
|
||||
/// </summary>
|
||||
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<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
|
||||
{
|
||||
List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>();
|
||||
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<FriendListItem> GetUserFriendList(UUID ownerId)
|
||||
{
|
||||
List<FriendListItem> friendList=new List<FriendListItem>();
|
||||
Dictionary<UUID, FriendListItem> friendListItemDictionary = new Dictionary<UUID, FriendListItem>();
|
||||
|
||||
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<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> friendsIds)
|
||||
{
|
||||
Dictionary<UUID, FriendRegionInfo> friendRegionInfos=new Dictionary<UUID, FriendRegionInfo>();
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false">
|
||||
<id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="Type" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="Name" type="String" length="64" />
|
||||
<property name="Description" type="String" length="64" />
|
||||
<property name="Local" type="boolean" />
|
||||
<property name="Temporary" type="boolean" />
|
||||
<property name="Data" type="binary" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Data.NHibernate.EstateRegionLink, OpenSim.Data.NHibernate" table="EstateRegionLink" lazy="false">
|
||||
<id name="EstateRegionLinkID" column="EstateRegionLinkID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
|
||||
<property name="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.EstateSettings, OpenSim.Framework" table="EstateSettings" lazy="false">
|
||||
|
||||
<id name="EstateID" column="EstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate">
|
||||
<generator class="increment" />
|
||||
</id>
|
||||
|
||||
<property name="ParentEstateID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="EstateOwner" column="EstateOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="EstateName" column="Name" type="String" length="64" />
|
||||
|
||||
<property name="RedirectGridX" type="System.Int32" />
|
||||
<property name="RedirectGridY" type="System.Int32" />
|
||||
|
||||
<property name="BillableFactor" type="System.Single" />
|
||||
<property name="PricePerMeter" type="System.Int32" />
|
||||
<property name="SunPosition" type="System.Double" />
|
||||
|
||||
<property name="UseGlobalTime" type="System.Boolean" />
|
||||
<property name="FixedSun" type="System.Boolean" />
|
||||
<property name="AllowVoice" type="System.Boolean" />
|
||||
<property name="AllowDirectTeleport" type="System.Boolean" />
|
||||
<property name="ResetHomeOnTeleport" type="System.Boolean" />
|
||||
<property name="PublicAccess" type="System.Boolean" />
|
||||
<property name="DenyAnonymous" type="System.Boolean" />
|
||||
<property name="DenyIdentified" type="System.Boolean" />
|
||||
<property name="DenyTransacted" type="System.Boolean" />
|
||||
<property name="DenyMinors" type="System.Boolean" />
|
||||
<property name="BlockDwell" type="System.Boolean" />
|
||||
<property name="EstateSkipScripts" type="System.Boolean" />
|
||||
<property name="TaxFree" type="System.Boolean" />
|
||||
<property name="AbuseEmailToEstateOwner" type="System.Boolean" />
|
||||
|
||||
<property name="AbuseEmail" type="String" length="255" />
|
||||
|
||||
<array name="EstateManagers" table="EstateManagers" cascade="all">
|
||||
<key column="EstateID" />
|
||||
<index column="ArrayIndex" />
|
||||
<element column="ManagerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
</array>
|
||||
|
||||
<array name="EstateAccess" table="EstateUsers" cascade="all">
|
||||
<key column="EstateID" />
|
||||
<index column="ArrayIndex" />
|
||||
<element column="UserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
</array>
|
||||
|
||||
<array name="EstateGroups" table="EstateGroups" cascade="all">
|
||||
<key column="EstateID" />
|
||||
<index column="ArrayIndex" />
|
||||
<element column="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
</array>
|
||||
|
||||
<array name="EstateBans" table="EstateBans" cascade="all">
|
||||
<key column="EstateID" />
|
||||
<index column="ArrayIndex" />
|
||||
<composite-element class="OpenSim.Framework.EstateBan, OpenSim.Framework">
|
||||
<property name="BannedUserID" column="BannedUserID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="BannedHostAddress" column="BannedHostAddress" type="String" length="16"/>
|
||||
<property name="BannedHostIPMask" column="BannedHostIPMask" type="String" length="16"/>
|
||||
<property name="BannedHostNameMask" column="BannedHostNameMask" type="String" length="16"/>
|
||||
</composite-element>
|
||||
</array>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
|
||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="Type" type="Int16" />
|
||||
<property name="Version" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Name" type="String" length="64" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
|
||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="InvType" type="System.Int32" />
|
||||
<property name="AssetType" type="System.Int32" />
|
||||
<property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="CreatorId" type="string" column="Creator"/>
|
||||
<property name="Name" type="String" length="64" />
|
||||
<property name="Description" type="String" length="64" />
|
||||
<property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="EveryOnePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="GroupOwned" type="boolean" />
|
||||
<property name="SalePrice" type="System.Int32" />
|
||||
<property name="SaleType" type="System.Byte" />
|
||||
<property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="CreationDate" type="System.Int32" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -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
|
|
@ -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)
|
||||
)
|
|
@ -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)
|
||||
);
|
|
@ -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)
|
||||
|
|
@ -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)
|
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
@ -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)
|
|
@ -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)
|
||||
)
|
||||
|
|
@ -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);
|
|
@ -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';
|
|
@ -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';
|
|
@ -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);
|
|
@ -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);
|
|
@ -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';
|
||||
|
|
@ -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);
|
|
@ -1,23 +0,0 @@
|
|||
<Addin id="OpenSim.Data.NHibernate" version="0.1">
|
||||
<Runtime>
|
||||
<Import assembly="OpenSim.Data.NHibernate.dll"/>
|
||||
</Runtime>
|
||||
<Dependencies>
|
||||
<Addin id="OpenSim.Data" version="0.5" />
|
||||
</Dependencies>
|
||||
<Extension path = "/OpenSim/GridData">
|
||||
<Plugin id="NHibernateGridData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateGridData" />
|
||||
</Extension>
|
||||
<!-- <Extension path = "/OpenSim/LogData">
|
||||
<Plugin id="MySQLLogData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
|
||||
</Extension> -->
|
||||
<Extension path = "/OpenSim/AssetData">
|
||||
<Plugin id="NHibernateAssetData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateAssetData" />
|
||||
</Extension>
|
||||
<Extension path = "/OpenSim/InventoryData">
|
||||
<Plugin id="NHibernateInventoryData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateInventoryData" />
|
||||
</Extension>
|
||||
<Extension path = "/OpenSim/UserData">
|
||||
<Plugin id="NHibernateUserData" provider="OpenSim.Data.NHibernate.dll" type="OpenSim.Data.NHibernate.NHibernateUserData" />
|
||||
</Extension>
|
||||
</Addin>
|
|
@ -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)
|
||||
);
|
|
@ -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)
|
||||
);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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)
|
||||
);
|
||||
|
|
@ -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);
|
|
@ -1,44 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Data.RegionProfileData, OpenSim.Data" table="Regions" lazy="false">
|
||||
<id name="Uuid" column="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
|
||||
<property name="Owner_uuid" column="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="OriginUUID" column="OriginID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="RegionHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
<property name="RegionName" type="String" length="32" />
|
||||
<property name="RegionRecvKey" type="String" length="128" />
|
||||
<property name="RegionSendKey" type="String" length="128" />
|
||||
<property name="RegionSecret" type="String" length="128" />
|
||||
<property name="RegionDataURI" type="String" length="255" />
|
||||
|
||||
<property name="ServerIP" type="String" length="64" />
|
||||
<property name="ServerPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="ServerURI" type="String" length="255" />
|
||||
|
||||
<property name="RegionLocX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="RegionLocY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="RegionLocZ" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="EastOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
<property name="WestOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
<property name="SouthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
<property name="NorthOverrideHandle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="RegionAssetURI" type="String" length="255" />
|
||||
<property name="RegionAssetRecvKey" type="String" length="128" />
|
||||
<property name="RegionAssetSendKey" type="String" length="128" />
|
||||
|
||||
<property name="RegionUserURI" type="String" length="255" />
|
||||
<property name="RegionUserRecvKey" type="String" length="128" />
|
||||
<property name="RegionUserSendKey" type="String" length="128" />
|
||||
<property name="RegionMapTextureID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="ServerHttpPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="ServerRemotingPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,56 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.RegionSettings, OpenSim.Framework" table="RegionSettings" lazy="false">
|
||||
<id name="RegionUUID" column="RegionId" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
|
||||
<property name="BlockTerraform" type="System.Boolean" />
|
||||
<property name="BlockFly" type="System.Boolean" />
|
||||
<property name="AllowDamage" type="System.Boolean" />
|
||||
<property name="RestrictPushing" type="System.Boolean" />
|
||||
<property name="AllowLandResell" type="System.Boolean" />
|
||||
<property name="AllowLandJoinDivide" type="System.Boolean" />
|
||||
<property name="BlockShowInSearch" type="System.Boolean" />
|
||||
|
||||
<property name="AgentLimit" type="System.Int32" />
|
||||
<property name="ObjectBonus" type="System.Double" />
|
||||
<property name="Maturity" type="System.Int32" />
|
||||
|
||||
<property name="DisableScripts" type="System.Boolean" />
|
||||
<property name="DisableCollisions" type="System.Boolean" />
|
||||
<property name="DisablePhysics" type="System.Boolean" />
|
||||
|
||||
<property name="TerrainTexture1" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="TerrainTexture2" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="TerrainTexture3" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="TerrainTexture4" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="Elevation1NW" type="System.Double" />
|
||||
<property name="Elevation2NW" type="System.Double" />
|
||||
<property name="Elevation1NE" type="System.Double" />
|
||||
<property name="Elevation2NE" type="System.Double" />
|
||||
<property name="Elevation1SE" type="System.Double" />
|
||||
<property name="Elevation2SE" type="System.Double" />
|
||||
<property name="Elevation1SW" type="System.Double" />
|
||||
<property name="Elevation2SW" type="System.Double" />
|
||||
|
||||
<property name="WaterHeight" type="System.Double" />
|
||||
<property name="TerrainRaiseLimit" type="System.Double" />
|
||||
<property name="TerrainLowerLimit" type="System.Double" />
|
||||
|
||||
<property name="UseEstateSun" type="System.Boolean" />
|
||||
<property name="Sandbox" type="System.Boolean" />
|
||||
|
||||
<property name="SunVector" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="SunVectorX" />
|
||||
<column name="SunVectorY" />
|
||||
<column name="SunVectorZ" />
|
||||
</property>
|
||||
|
||||
<property name="FixedSun" type="System.Boolean" />
|
||||
<property name="SunPosition" type="System.Double" />
|
||||
<property name="Covenant" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,147 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Region.Framework.Scenes.SceneObjectPart, OpenSim.Region.Framework" table="Prims" lazy="false">
|
||||
<id name="UUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="ParentID" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate"/>
|
||||
<property name="ParentUUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="CreationDate" type="System.Int32" />
|
||||
<property name="Name" type="String" length="255" />
|
||||
<property name="Text" type="String" length="255" />
|
||||
<property name="Description" type="String" length="255" />
|
||||
<property name="SitName" type="String" length="255" />
|
||||
<property name="TouchName" type="String" length="255" />
|
||||
<property name="Color" type="OpenSim.Data.NHibernate.ColorUserType, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="ObjectFlags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="LinkNum" type="System.Int32" />
|
||||
|
||||
<property name="OwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="NextOwnerMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="GroupMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="EveryoneMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="BaseMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="Material" type="Byte" />
|
||||
<property name="ScriptAccessPin" type="System.Int32" />
|
||||
<property name="TextureAnimation" type="binary" />
|
||||
<property name="ParticleSystem" type="binary" />
|
||||
<property name="ClickAction" type="Byte" />
|
||||
|
||||
<property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="PositionX" />
|
||||
<column name="PositionY" />
|
||||
<column name="PositionZ" />
|
||||
</property>
|
||||
|
||||
<property name="GroupPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="GroupPositionX" />
|
||||
<column name="GroupPositionY" />
|
||||
<column name="GroupPositionZ" />
|
||||
</property>
|
||||
|
||||
<property name="Velocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="VelocityX" />
|
||||
<column name="VelocityY" />
|
||||
<column name="VelocityZ" />
|
||||
</property>
|
||||
|
||||
<property name="AngularVelocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="AngularVelocityX" />
|
||||
<column name="AngularVelocityY" />
|
||||
<column name="AngularVelocityZ" />
|
||||
</property>
|
||||
|
||||
<property name="Acceleration" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="AccelerationX" />
|
||||
<column name="AccelerationY" />
|
||||
<column name="AccelerationZ" />
|
||||
</property>
|
||||
|
||||
<property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="SitTargetOffsetX" />
|
||||
<column name="SitTargetOffsetY" />
|
||||
<column name="SitTargetOffsetZ" />
|
||||
</property>
|
||||
|
||||
<property name="RotationOffset" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
|
||||
<column name="RotationX" />
|
||||
<column name="RotationY" />
|
||||
<column name="RotationZ" />
|
||||
<column name="RotationW" />
|
||||
</property>
|
||||
|
||||
<property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
|
||||
<column name="SitTargetOrientX" />
|
||||
<column name="SitTargetOrientY" />
|
||||
<column name="SitTargetOrientZ" />
|
||||
<column name="SitTargetOrientW" />
|
||||
</property>
|
||||
|
||||
<component name="Shape">
|
||||
<property name="Scale" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="ScaleX" />
|
||||
<column name="ScaleY" />
|
||||
<column name="ScaleZ" />
|
||||
</property>
|
||||
<property name="PCode" type="System.Byte" />
|
||||
<property name="PathBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="PathEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="PathScaleX" type="System.Byte" />
|
||||
<property name="PathScaleY" type="System.Byte" />
|
||||
<property name="PathShearX" type="System.Byte" />
|
||||
<property name="PathShearY" type="System.Byte" />
|
||||
<property name="PathSkew" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="PathCurve" type="System.Byte" />
|
||||
<property name="PathRadiusOffset" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="PathRevolutions" type="System.Byte" />
|
||||
<property name="PathTaperX" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="PathTaperY" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="PathTwist" type="OpenSim.Data.NHibernate.SByteType, OpenSim.Data.NHibernate" />
|
||||
<property name="ProfileBegin" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="ProfileEnd" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="ProfileCurve" type="System.Byte" />
|
||||
<property name="ProfileHollow" type="OpenSim.Data.NHibernate.UInt16Type, OpenSim.Data.NHibernate" />
|
||||
<property name="TextureEntry" column="Texture" type="binary" />
|
||||
<property name="ExtraParams" type="binary" />
|
||||
<property name="State" type="System.Byte" />
|
||||
</component>
|
||||
</class>
|
||||
<class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false">
|
||||
<id name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<!-- <property name="MapData" type="OpenSim.Data.NHibernate.BlobType, OpenSim.Data.NHibernate" /> -->
|
||||
<property name="MapData" type="binary" />
|
||||
</class>
|
||||
<class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
|
||||
<id name="ItemID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
|
||||
<property name="CurrentPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="BasePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="EveryonePermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="GroupPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="NextPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="Name" type="String" length="255" />
|
||||
<property name="Description" type="String" length="255" />
|
||||
<property name="CreationDate" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="Flags" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="InvType" type="System.Int32" />
|
||||
<property name="Type" type="System.Int32" />
|
||||
</class>
|
||||
|
||||
</hibernate-mapping>
|
|
@ -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)
|
||||
);
|
|
@ -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)
|
||||
);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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)
|
||||
);
|
|
@ -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);
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false">
|
||||
<id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
|
||||
<property name="AgentIP" type="String" length="24" />
|
||||
<property name="AgentPort" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="AgentOnline" type="boolean" />
|
||||
<property name="SessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SecureSessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="InitialRegion" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Region" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="LoginTime" type="Int32" />
|
||||
<property name="LogoutTime" type="Int32" />
|
||||
<property name="Handle" type="OpenSim.Data.NHibernate.UInt64Type, OpenSim.Data.NHibernate" />
|
||||
|
||||
<property name="Position" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="PositionX" />
|
||||
<column name="PositionY" />
|
||||
<column name="PositionZ" />
|
||||
</property>
|
||||
|
||||
<property name="LookAt" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
|
||||
<column name="LookAtX" />
|
||||
<column name="LookAtY" />
|
||||
<column name="LookAtZ" />
|
||||
</property>
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
|
||||
<id name="Owner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="BodyItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="BodyAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SkinItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SkinAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="HairItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="HairAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="EyesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="EyesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="ShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="ShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="PantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="PantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="ShoesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="ShoesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SocksItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SocksAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="JacketItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="JacketAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="GlovesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="GlovesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="UnderShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="UnderPantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SkirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="SkirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="VisualParams" type="binary" />
|
||||
<property name="Serial" type="Int32" />
|
||||
<property name="AvatarHeight" type="Single" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Data.NHibernate.UserFriend, OpenSim.Data.NHibernate" table="UserFriends" lazy="false">
|
||||
<id name="UserFriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="FriendID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="FriendPermissions" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false">
|
||||
<id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="FirstName" index="UserFirstNameIndex" type="String" length="32" />
|
||||
<property name="SurName" index="UserSurnameIndex" type="String" length="32" />
|
||||
<property name="Email" type="String" length="250" />
|
||||
<property name="PasswordHash" type="String" length="32" />
|
||||
<property name="PasswordSalt" type="String" length="32" />
|
||||
<property name="HomeRegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="HomeRegionX" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="HomeRegionY" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="HomeLocationX" type="Single" />
|
||||
<property name="HomeLocationY" type="Single" />
|
||||
<property name="HomeLocationZ" type="Single" />
|
||||
<property name="HomeLookAtX" type="Single" />
|
||||
<property name="HomeLookAtY" type="Single" />
|
||||
<property name="HomeLookAtZ" type="Single" />
|
||||
<property name="Created" type="Int32" />
|
||||
<property name="LastLogin" type="Int32" />
|
||||
<property name="UserInventoryURI" type="String" length="255"/>
|
||||
<property name="UserAssetURI" type="String" length="255"/>
|
||||
<property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="AboutText" type="String" length="255" />
|
||||
<property name="FirstLifeAboutText" type="String" length="255" />
|
||||
<property name="CanDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="WantDoMask" type="OpenSim.Data.NHibernate.UInt32Type, OpenSim.Data.NHibernate" />
|
||||
<property name="UserFlags" type="Int32" />
|
||||
<property name="GodLevel" type="Int32" />
|
||||
<property name="CustomType" type="String" length="32" />
|
||||
<property name="Partner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
<property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -403,7 +403,7 @@ namespace OpenSim.Framework.Communications
|
|||
/// In case, we are invoked asynchroneously this object will keep track of the state
|
||||
/// </summary>
|
||||
AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state);
|
||||
ThreadPool.QueueUserWorkItem(RequestHelper, ar);
|
||||
ThreadPool.UnsafeQueueUserWorkItem(RequestHelper, ar);
|
||||
return ar;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Framework
|
|||
|
||||
for (int i = 0; i < threadCount; i++)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(
|
||||
ThreadPool.UnsafeQueueUserWorkItem(
|
||||
delegate(object o)
|
||||
{
|
||||
int threadIndex = (int)o;
|
||||
|
@ -122,7 +122,7 @@ namespace OpenSim.Framework
|
|||
|
||||
for (int i = 0; i < threadCount; i++)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(
|
||||
ThreadPool.UnsafeQueueUserWorkItem(
|
||||
delegate(object o)
|
||||
{
|
||||
int threadIndex = (int)o;
|
||||
|
@ -178,7 +178,7 @@ namespace OpenSim.Framework
|
|||
|
||||
for (int i = 0; i < threadCount; i++)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(
|
||||
ThreadPool.UnsafeQueueUserWorkItem(
|
||||
delegate(object o)
|
||||
{
|
||||
int threadIndex = (int)o;
|
||||
|
|
|
@ -1609,7 +1609,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
//while (true)
|
||||
//{
|
||||
// context = m_httpListener.GetContext();
|
||||
// ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
|
||||
// ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(HandleRequest), context);
|
||||
// }
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace OpenSim.Grid.MessagingServer.Modules
|
|||
friendlistupdater.OnGetRegionData += m_regionModule.GetRegionInfo;
|
||||
friendlistupdater.OnDone += PresenceUpdateDone;
|
||||
WaitCallback cb = new WaitCallback(friendlistupdater.go);
|
||||
ThreadPool.QueueUserWorkItem(cb);
|
||||
ThreadPool.UnsafeQueueUserWorkItem(cb, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="map">heightmap</param>
|
||||
public virtual void SendLayerData(float[] map)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(DoSendLayerData, map);
|
||||
ThreadPool.UnsafeQueueUserWorkItem(DoSendLayerData, map);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -912,7 +912,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="windSpeeds">16x16 array of wind speeds</param>
|
||||
public virtual void SendWindData(Vector2[] windSpeeds)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds);
|
||||
ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -921,7 +921,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// <param name="windSpeeds">16x16 array of cloud densities</param>
|
||||
public virtual void SendCloudData(float[] cloudDensity)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity);
|
||||
ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -313,11 +313,11 @@ namespace Flotsam.RegionModules.AssetCache
|
|||
|
||||
}
|
||||
|
||||
ThreadPool.QueueUserWorkItem(
|
||||
ThreadPool.UnsafeQueueUserWorkItem(
|
||||
delegate
|
||||
{
|
||||
WriteFileCache(filename, asset);
|
||||
}
|
||||
}, null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1095,7 +1095,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// The reason is so we don't cause the thread to freeze waiting
|
||||
// for the 1 second it costs to start a thread manually.
|
||||
if (!threadrunning)
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread));
|
||||
ThreadPool.UnsafeQueueUserWorkItem(this.StartThread, null);
|
||||
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
|
|
|
@ -104,11 +104,9 @@ frontends = ReferenceFrontend,OpenSimAssetFrontend,OpenSimInventoryFrontend,Brow
|
|||
; supported by OpenSim is supported.
|
||||
asset_database_provider = "OpenSim.Data.SQLite.dll"
|
||||
;asset_database_provider = "OpenSim.Data.MySQL.dll"
|
||||
;asset_database_provider = "OpenSim.Data.NHibernate.dll"
|
||||
|
||||
inventory_database_provider = "OpenSim.Data.SQLite.dll"
|
||||
;inventory_database_provider = "OpenSim.Data.MySQL.dll"
|
||||
;inventory_database_provider = "OpenSim.Data.NHibernate.dll"
|
||||
|
||||
; Database connection string used by the database backend.
|
||||
|
||||
|
@ -119,7 +117,3 @@ inventory_database_connect = "URI=file:Inventory.db,version=3"
|
|||
; For MySQL
|
||||
;asset_database_connect = "Server=localhost; Database=opensim; User=changeme; Password=changeme;"
|
||||
;inventory_database_connect = "Server=localhost; Database=opensim; User=changeme; Password=changeme;"
|
||||
|
||||
; For NHibernate
|
||||
;asset_database_connect = "SQLiteDialect;SQLite20Driver;Data Source=file:Asset.db;Version=3"
|
||||
;inventory_database_connect = "SQLiteDialect;SQLite20Driver;Data Source=file:Asset.db;Version=3"
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -23,12 +23,6 @@
|
|||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- if you'd like to know what NHibernate is doing more set value="DEBUG" -->
|
||||
<logger name="NHibernate" additivity="false">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="NHibernateFileLog"/>
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="Console" />
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
<conversionPattern value="%date %-5level - %logger %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
<!-- if you'd like to know what NHibernate is doing more set value="DEBUG" -->
|
||||
<logger name="NHibernate" additivity="false">
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="NHibernateFileLog"/>
|
||||
</logger>
|
||||
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue