C# Класс OpenSim.Data.SQLiteLegacy.SQLiteSimulationData

A RegionData Interface to the SQLite database
Наследование: ISimulationDataStore
Показать файл Открыть проект

Открытые методы

Метод Описание
Commit ( ) : void

Dispose ( ) : void
Initialise ( string connectionString ) : void

Initialises RegionData Interface Loads and initialises a new SQLite connection and maintains it.

LoadLandObjects ( UUID regionUUID ) : List

LoadObjects ( UUID regionUUID ) : List

Load persisted objects from region storage.

LoadRegionSettings ( UUID regionUUID ) : OpenSim.Framework.RegionSettings
LoadRegionWindlightSettings ( UUID regionUUID ) : RegionLightShareData
LoadTerrain ( UUID regionID ) : ].double[

Load the latest terrain revision from region storage

RemoveLandObject ( UUID globalID ) : void

RemoveObject ( UUID obj, UUID regionUUID ) : void

Removes an object from region storage

RemoveRegionWindlightSettings ( UUID regionID ) : void
SQLiteSimulationData ( ) : System
SQLiteSimulationData ( string connectionString ) : System
Shutdown ( ) : void

See Commit

StoreLandObject ( ILandObject parcel ) : void

StoreObject ( SceneObjectGroup obj, UUID regionUUID ) : void

Adds an object into region storage

StorePrimInventory ( UUID primID, ICollection items ) : void

StoreRegionSettings ( OpenSim.Framework.RegionSettings rs ) : void
StoreRegionWindlightSettings ( RegionLightShareData wl ) : void
StoreTerrain ( double ter, UUID regionID ) : void

Store a terrain revision in region storage

Приватные методы

Метод Описание
LoadItems ( SceneObjectPart prim ) : void

Load in a prim's persisted inventory.

RemoveItems ( UUID uuid ) : void

Remove all persisted items of the given prim. The caller must acquire the necessrary synchronization locks and commit or rollback changes.

addPrim ( SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID ) : void

buildItem ( DataRow row ) : TaskInventoryItem

Build a prim inventory item from the persisted data.

buildLandAccessData ( DataRow row ) : ParcelManager.ParcelAccessEntry

Build a land access entry from the persisted data.

buildLandData ( DataRow row ) : LandData

Build a Land Data from the persisted data.

buildPrim ( DataRow row ) : SceneObjectPart

buildRegionSettings ( DataRow row ) : OpenSim.Framework.RegionSettings
buildShape ( DataRow row ) : OpenSim.Framework.PrimitiveBaseShape

createCol ( DataTable dt, string name, Type type ) : void

createInsertCommand ( string table, DataTable dt ) : Mono.Data.SqliteClient.SqliteCommand

Create an insert command

This is subtle enough to deserve some commentary. Instead of doing *lots* and *lots of hardcoded strings for database definitions we'll use the fact that realistically all insert statements look like "insert into A(b, c) values(:b, :c) on the parameterized query front. If we just have a list of b, c, etc... we can generate these strings instead of typing them out.

createItemsTable ( ) : DataTable

creates "primitems" table

createLandAccessListTable ( ) : DataTable

create "landaccesslist" table

createLandTable ( ) : DataTable

Creates "land" table

createPrimTable ( ) : DataTable

Creates the "prims" table

createRegionSettingsTable ( ) : DataTable
createShapeTable ( ) : DataTable

Creates "primshapes" table

createSqliteParameter ( string name, Type type ) : Mono.Data.SqliteClient.SqliteParameter

This is a convenience function that collapses 5 repetitive lines for defining SqliteParameters to 2 parameters: column name and database type. It assumes certain conventions like :param as the param name to replace in parametrized queries, and that source version is always current version, both of which are fine for us.

createTerrainTable ( ) : DataTable

Creates the "terrain" table

createUpdateCommand ( string table, string pk, DataTable dt ) : Mono.Data.SqliteClient.SqliteCommand

create an update command

createUpdateCommand ( string table, string pk1, string pk2, DataTable dt ) : Mono.Data.SqliteClient.SqliteCommand

create an update command

dbtypeFromType ( Type type ) : DbType

Type conversion function

fillItemRow ( DataRow row, TaskInventoryItem taskItem ) : void

fillLandAccessRow ( DataRow row, ParcelManager entry, UUID parcelID ) : void

fillLandRow ( DataRow row, LandData land, UUID regionUUID ) : void

fillPrimRow ( DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID ) : void

fillRegionSettingsRow ( DataRow row, OpenSim.Framework.RegionSettings settings ) : void
fillShapeRow ( DataRow row, SceneObjectPart prim ) : void

serializeTerrain ( double val ) : Array

setupItemsCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

setupLandAccessCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

setupLandCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

setupPrimCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

setupRegionSettingsCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void
setupShapeCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

setupTerrainCommands ( Mono.Data.SqliteClient.SqliteDataAdapter da, Mono.Data.SqliteClient.SqliteConnection conn ) : void

Описание методов

Commit() публичный Метод

public Commit ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Initialise() публичный Метод

Initialises RegionData Interface Loads and initialises a new SQLite connection and maintains it.
public Initialise ( string connectionString ) : void
connectionString string the connection string
Результат void

LoadLandObjects() публичный Метод

public LoadLandObjects ( UUID regionUUID ) : List
regionUUID UUID
Результат List

LoadObjects() публичный Метод

Load persisted objects from region storage.
public LoadObjects ( UUID regionUUID ) : List
regionUUID UUID The region UUID
Результат List

LoadRegionSettings() публичный Метод

public LoadRegionSettings ( UUID regionUUID ) : OpenSim.Framework.RegionSettings
regionUUID UUID
Результат OpenSim.Framework.RegionSettings

LoadRegionWindlightSettings() публичный Метод

public LoadRegionWindlightSettings ( UUID regionUUID ) : RegionLightShareData
regionUUID UUID
Результат OpenSim.Framework.RegionLightShareData

LoadTerrain() публичный Метод

Load the latest terrain revision from region storage
public LoadTerrain ( UUID regionID ) : ].double[
regionID UUID the region UUID
Результат ].double[

RemoveLandObject() публичный Метод

public RemoveLandObject ( UUID globalID ) : void
globalID UUID
Результат void

RemoveObject() публичный Метод

Removes an object from region storage
public RemoveObject ( UUID obj, UUID regionUUID ) : void
obj UUID the object
regionUUID UUID the region UUID
Результат void

RemoveRegionWindlightSettings() публичный Метод

public RemoveRegionWindlightSettings ( UUID regionID ) : void
regionID UUID
Результат void

SQLiteSimulationData() публичный Метод

public SQLiteSimulationData ( ) : System
Результат System

SQLiteSimulationData() публичный Метод

public SQLiteSimulationData ( string connectionString ) : System
connectionString string
Результат System

Shutdown() публичный Метод

See Commit
public Shutdown ( ) : void
Результат void

StoreLandObject() публичный Метод

public StoreLandObject ( ILandObject parcel ) : void
parcel ILandObject
Результат void

StoreObject() публичный Метод

Adds an object into region storage
public StoreObject ( SceneObjectGroup obj, UUID regionUUID ) : void
obj OpenSim.Region.Framework.Scenes.SceneObjectGroup the object
regionUUID UUID the region UUID
Результат void

StorePrimInventory() публичный Метод

public StorePrimInventory ( UUID primID, ICollection items ) : void
primID UUID
items ICollection
Результат void

StoreRegionSettings() публичный Метод

public StoreRegionSettings ( OpenSim.Framework.RegionSettings rs ) : void
rs OpenSim.Framework.RegionSettings
Результат void

StoreRegionWindlightSettings() публичный Метод

public StoreRegionWindlightSettings ( RegionLightShareData wl ) : void
wl OpenSim.Framework.RegionLightShareData
Результат void

StoreTerrain() публичный Метод

Store a terrain revision in region storage
public StoreTerrain ( double ter, UUID regionID ) : void
ter double terrain heightfield
regionID UUID region UUID
Результат void