C# Class OpenSim.Data.MSSQL.MSSQLSimulationData

A MSSQL Interface for the Region Server.
Inheritance: ISimulationDataStore
Show file Open project: N3X15/VoxelSim

Public Methods

Method Description
Dispose ( ) : void

Dispose the database

Initialise ( string connectionString ) : void

Initialises the region datastore

LoadLandObjects ( UUID regionUUID ) : List

Loads all the land objects of a region.

LoadObjects ( UUID regionUUID ) : List

Loads the objects present in the region.

LoadRegionSettings ( UUID regionUUID ) : OpenSim.Framework.RegionSettings

Loads the settings of a region.

LoadRegionWindlightSettings ( UUID regionUUID ) : RegionLightShareData
LoadTerrain ( UUID regionID ) : ].double[

Loads the terrain map.

MSSQLSimulationData ( ) : System
MSSQLSimulationData ( string connectionString ) : System
RemoveLandObject ( UUID globalID ) : void

Removes a land object from DB.

RemoveObject ( UUID objectID, UUID regionUUID ) : void

Removes a object from the database. Meaning removing it from tables Prims, PrimShapes and PrimItems

RemoveRegionWindlightSettings ( UUID regionID ) : void
Shutdown ( ) : void
StoreLandObject ( ILandObject parcel ) : void

Stores land object with landaccess list.

StoreObject ( SceneObjectGroup obj, UUID regionUUID ) : void

Stores all object's details apart from inventory

StorePrimInventory ( UUID primID, ICollection items ) : void

Store the inventory of a prim. Warning deletes everything first and then adds all again.

StoreRegionSettings ( OpenSim.Framework.RegionSettings regionSettings ) : void

Store region settings, need to check if the check is really necesary. If we can make something for creating new region.

StoreRegionWindlightSettings ( RegionLightShareData wl ) : void
StoreTerrain ( double terrain, UUID regionID ) : void

Stores the terrain map to DB.

Private Methods

Method Description
BuildItem ( IDataRecord inventoryRow ) : TaskInventoryItem

Build a prim inventory item from the persisted data.

BuildLandAccessData ( IDataRecord row ) : ParcelManager.ParcelAccessEntry

Builds the landaccess data from a data record.

BuildLandData ( IDataRecord row ) : LandData

Builds the land data from a datarecord.

BuildPrim ( IDataRecord primRow ) : SceneObjectPart

Builds the prim from a datarecord.

BuildRegionSettings ( IDataRecord row ) : OpenSim.Framework.RegionSettings

Builds the region settings from a datarecod.

BuildShape ( IDataRecord shapeRow ) : OpenSim.Framework.PrimitiveBaseShape

Builds the prim shape from a datarecord.

CreateLandAccessParameters ( ParcelManager parcelAccessEntry, UUID parcelID ) : System.Data.SqlClient.SqlParameter[]

Creates the land access parameters.

CreateLandParameters ( LandData land, UUID regionUUID ) : System.Data.SqlClient.SqlParameter[]

Creates the land parameters.

CreatePrimInventoryParameters ( TaskInventoryItem taskItem ) : System.Data.SqlClient.SqlParameter[]

Creates the prim inventory parameters.

CreatePrimParameters ( SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID ) : System.Data.SqlClient.SqlParameter[]

Creates the prim parameters for storing in DB.

CreatePrimShapeParameters ( SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID ) : System.Data.SqlClient.SqlParameter[]

Creates the primshape parameters for stroing in DB.

CreateRegionSettingParameters ( OpenSim.Framework.RegionSettings settings ) : System.Data.SqlClient.SqlParameter[]

Creates the region setting parameters.

LoadItems ( List allPrimsWithInventory ) : void

Load in the prim's persisted inventory.

StoreNewRegionSettings ( OpenSim.Framework.RegionSettings regionSettings ) : void

Stores new regionsettings.

StoreSceneObjectPrim ( SceneObjectPart sceneObjectPart, SqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID ) : void

Stores the prim of the sceneobjectpart.

StoreSceneObjectPrimShapes ( SceneObjectPart sceneObjectPart, SqlCommand sqlCommand, UUID sceneGroupID, UUID regionUUID ) : void

Stores the scene object prim shapes.

serializeTerrain ( double val ) : Array

Serializes the terrain data for storage in DB.

Method Details

Dispose() public method

Dispose the database
public Dispose ( ) : void
return void

Initialise() public method

Initialises the region datastore
public Initialise ( string connectionString ) : void
connectionString string The connection string.
return void

LoadLandObjects() public method

Loads all the land objects of a region.
public LoadLandObjects ( UUID regionUUID ) : List
regionUUID UUID The region UUID.
return List

LoadObjects() public method

Loads the objects present in the region.
public LoadObjects ( UUID regionUUID ) : List
regionUUID UUID The region UUID.
return List

LoadRegionSettings() public method

Loads the settings of a region.
public LoadRegionSettings ( UUID regionUUID ) : OpenSim.Framework.RegionSettings
regionUUID UUID The region UUID.
return OpenSim.Framework.RegionSettings

LoadRegionWindlightSettings() public method

public LoadRegionWindlightSettings ( UUID regionUUID ) : RegionLightShareData
regionUUID UUID
return OpenSim.Framework.RegionLightShareData

LoadTerrain() public method

Loads the terrain map.
public LoadTerrain ( UUID regionID ) : ].double[
regionID UUID regionID.
return ].double[

MSSQLSimulationData() public method

public MSSQLSimulationData ( ) : System
return System

MSSQLSimulationData() public method

public MSSQLSimulationData ( string connectionString ) : System
connectionString string
return System

RemoveLandObject() public method

Removes a land object from DB.
public RemoveLandObject ( UUID globalID ) : void
globalID UUID UUID of landobject
return void

RemoveObject() public method

Removes a object from the database. Meaning removing it from tables Prims, PrimShapes and PrimItems
public RemoveObject ( UUID objectID, UUID regionUUID ) : void
objectID UUID id of scenegroup
regionUUID UUID regionUUID (is this used anyway
return void

RemoveRegionWindlightSettings() public method

public RemoveRegionWindlightSettings ( UUID regionID ) : void
regionID UUID
return void

Shutdown() public method

public Shutdown ( ) : void
return void

StoreLandObject() public method

Stores land object with landaccess list.
public StoreLandObject ( ILandObject parcel ) : void
parcel ILandObject parcel data.
return void

StoreObject() public method

Stores all object's details apart from inventory
public StoreObject ( SceneObjectGroup obj, UUID regionUUID ) : void
obj OpenSim.Region.Framework.Scenes.SceneObjectGroup
regionUUID UUID
return void

StorePrimInventory() public method

Store the inventory of a prim. Warning deletes everything first and then adds all again.
public StorePrimInventory ( UUID primID, ICollection items ) : void
primID UUID
items ICollection
return void

StoreRegionSettings() public method

Store region settings, need to check if the check is really necesary. If we can make something for creating new region.
public StoreRegionSettings ( OpenSim.Framework.RegionSettings regionSettings ) : void
regionSettings OpenSim.Framework.RegionSettings region settings.
return void

StoreRegionWindlightSettings() public method

public StoreRegionWindlightSettings ( RegionLightShareData wl ) : void
wl OpenSim.Framework.RegionLightShareData
return void

StoreTerrain() public method

Stores the terrain map to DB.
public StoreTerrain ( double terrain, UUID regionID ) : void
terrain double terrain map data.
regionID UUID regionID.
return void