aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLDataStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLDataStore.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs44
1 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 82aab13..44bc660 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -536,14 +536,14 @@ namespace OpenSim.Data.MSSQL
536 * 536 *
537 **********************************************************************/ 537 **********************************************************************/
538 538
539 private DataColumn createCol(DataTable dt, string name, Type type) 539 private static DataColumn createCol(DataTable dt, string name, Type type)
540 { 540 {
541 DataColumn col = new DataColumn(name, type); 541 DataColumn col = new DataColumn(name, type);
542 dt.Columns.Add(col); 542 dt.Columns.Add(col);
543 return col; 543 return col;
544 } 544 }
545 545
546 private DataTable createTerrainTable() 546 private static DataTable createTerrainTable()
547 { 547 {
548 DataTable terrain = new DataTable("terrain"); 548 DataTable terrain = new DataTable("terrain");
549 549
@@ -554,7 +554,7 @@ namespace OpenSim.Data.MSSQL
554 return terrain; 554 return terrain;
555 } 555 }
556 556
557 private DataTable createPrimTable() 557 private static DataTable createPrimTable()
558 { 558 {
559 DataTable prims = new DataTable("prims"); 559 DataTable prims = new DataTable("prims");
560 560
@@ -618,7 +618,7 @@ namespace OpenSim.Data.MSSQL
618 return prims; 618 return prims;
619 } 619 }
620 620
621 private DataTable createLandTable() 621 private static DataTable createLandTable()
622 { 622 {
623 DataTable land = new DataTable("land"); 623 DataTable land = new DataTable("land");
624 createCol(land, "UUID", typeof(String)); 624 createCol(land, "UUID", typeof(String));
@@ -661,7 +661,7 @@ namespace OpenSim.Data.MSSQL
661 return land; 661 return land;
662 } 662 }
663 663
664 private DataTable createLandAccessListTable() 664 private static DataTable createLandAccessListTable()
665 { 665 {
666 DataTable landaccess = new DataTable("landaccesslist"); 666 DataTable landaccess = new DataTable("landaccesslist");
667 createCol(landaccess, "LandUUID", typeof(String)); 667 createCol(landaccess, "LandUUID", typeof(String));
@@ -671,7 +671,7 @@ namespace OpenSim.Data.MSSQL
671 return landaccess; 671 return landaccess;
672 } 672 }
673 673
674 private DataTable createShapeTable() 674 private static DataTable createShapeTable()
675 { 675 {
676 DataTable shapes = new DataTable("primshapes"); 676 DataTable shapes = new DataTable("primshapes");
677 createCol(shapes, "UUID", typeof(String)); 677 createCol(shapes, "UUID", typeof(String));
@@ -713,7 +713,7 @@ namespace OpenSim.Data.MSSQL
713 return shapes; 713 return shapes;
714 } 714 }
715 715
716 private DataTable createItemsTable() 716 private static DataTable createItemsTable()
717 { 717 {
718 DataTable items = new DataTable("primitems"); 718 DataTable items = new DataTable("primitems");
719 719
@@ -848,7 +848,7 @@ namespace OpenSim.Data.MSSQL
848 /// </summary> 848 /// </summary>
849 /// <param name="row"></param> 849 /// <param name="row"></param>
850 /// <returns></returns> 850 /// <returns></returns>
851 private TaskInventoryItem buildItem(DataRow row) 851 private static TaskInventoryItem buildItem(DataRow row)
852 { 852 {
853 TaskInventoryItem taskItem = new TaskInventoryItem(); 853 TaskInventoryItem taskItem = new TaskInventoryItem();
854 854
@@ -877,7 +877,7 @@ namespace OpenSim.Data.MSSQL
877 return taskItem; 877 return taskItem;
878 } 878 }
879 879
880 private LandData buildLandData(DataRow row) 880 private static LandData buildLandData(DataRow row)
881 { 881 {
882 LandData newData = new LandData(); 882 LandData newData = new LandData();
883 883
@@ -922,7 +922,7 @@ namespace OpenSim.Data.MSSQL
922 return newData; 922 return newData;
923 } 923 }
924 924
925 private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) 925 private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
926 { 926 {
927 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 927 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
928 entry.AgentID = new LLUUID((string)row["AccessUUID"]); 928 entry.AgentID = new LLUUID((string)row["AccessUUID"]);
@@ -931,7 +931,7 @@ namespace OpenSim.Data.MSSQL
931 return entry; 931 return entry;
932 } 932 }
933 933
934 private Array serializeTerrain(double[,] val) 934 private static Array serializeTerrain(double[,] val)
935 { 935 {
936 MemoryStream str = new MemoryStream(65536 * sizeof(double)); 936 MemoryStream str = new MemoryStream(65536 * sizeof(double));
937 BinaryWriter bw = new BinaryWriter(str); 937 BinaryWriter bw = new BinaryWriter(str);
@@ -1020,7 +1020,7 @@ namespace OpenSim.Data.MSSQL
1020 } 1020 }
1021 } 1021 }
1022 1022
1023 private void fillItemRow(DataRow row, TaskInventoryItem taskItem) 1023 private static void fillItemRow(DataRow row, TaskInventoryItem taskItem)
1024 { 1024 {
1025 row["itemID"] = taskItem.ItemID; 1025 row["itemID"] = taskItem.ItemID;
1026 row["primID"] = taskItem.ParentPartID; 1026 row["primID"] = taskItem.ParentPartID;
@@ -1044,7 +1044,7 @@ namespace OpenSim.Data.MSSQL
1044 row["groupPermissions"] = taskItem.GroupMask; 1044 row["groupPermissions"] = taskItem.GroupMask;
1045 } 1045 }
1046 1046
1047 private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1047 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
1048 { 1048 {
1049 row["UUID"] = land.globalID.UUID; 1049 row["UUID"] = land.globalID.UUID;
1050 row["RegionUUID"] = regionUUID.UUID; 1050 row["RegionUUID"] = regionUUID.UUID;
@@ -1082,14 +1082,14 @@ namespace OpenSim.Data.MSSQL
1082 row["UserLookAtZ"] = land.userLookAt.Z; 1082 row["UserLookAtZ"] = land.userLookAt.Z;
1083 } 1083 }
1084 1084
1085 private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) 1085 private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID)
1086 { 1086 {
1087 row["LandUUID"] = parcelID.UUID; 1087 row["LandUUID"] = parcelID.UUID;
1088 row["AccessUUID"] = entry.AgentID.UUID; 1088 row["AccessUUID"] = entry.AgentID.UUID;
1089 row["Flags"] = entry.Flags; 1089 row["Flags"] = entry.Flags;
1090 } 1090 }
1091 1091
1092 private PrimitiveBaseShape buildShape(DataRow row) 1092 private static PrimitiveBaseShape buildShape(DataRow row)
1093 { 1093 {
1094 PrimitiveBaseShape s = new PrimitiveBaseShape(); 1094 PrimitiveBaseShape s = new PrimitiveBaseShape();
1095 s.Scale = new LLVector3( 1095 s.Scale = new LLVector3(
@@ -1128,7 +1128,7 @@ namespace OpenSim.Data.MSSQL
1128 return s; 1128 return s;
1129 } 1129 }
1130 1130
1131 private void fillShapeRow(DataRow row, SceneObjectPart prim) 1131 private static void fillShapeRow(DataRow row, SceneObjectPart prim)
1132 { 1132 {
1133 PrimitiveBaseShape s = prim.Shape; 1133 PrimitiveBaseShape s = prim.Shape;
1134 row["UUID"] = prim.UUID; 1134 row["UUID"] = prim.UUID;
@@ -1235,7 +1235,7 @@ namespace OpenSim.Data.MSSQL
1235 * 1235 *
1236 **********************************************************************/ 1236 **********************************************************************/
1237 1237
1238 private SqlCommand createInsertCommand(string table, DataTable dt) 1238 private static SqlCommand createInsertCommand(string table, DataTable dt)
1239 { 1239 {
1240 /** 1240 /**
1241 * This is subtle enough to deserve some commentary. 1241 * This is subtle enough to deserve some commentary.
@@ -1270,7 +1270,7 @@ namespace OpenSim.Data.MSSQL
1270 return cmd; 1270 return cmd;
1271 } 1271 }
1272 1272
1273 private SqlCommand createUpdateCommand(string table, string pk, DataTable dt) 1273 private static SqlCommand createUpdateCommand(string table, string pk, DataTable dt)
1274 { 1274 {
1275 string sql = "update " + table + " set "; 1275 string sql = "update " + table + " set ";
1276 string subsql = String.Empty; 1276 string subsql = String.Empty;
@@ -1297,7 +1297,7 @@ namespace OpenSim.Data.MSSQL
1297 return cmd; 1297 return cmd;
1298 } 1298 }
1299 1299
1300 private string defineTable(DataTable dt) 1300 private static string defineTable(DataTable dt)
1301 { 1301 {
1302 string sql = "create table " + dt.TableName + "("; 1302 string sql = "create table " + dt.TableName + "(";
1303 string subsql = String.Empty; 1303 string subsql = String.Empty;
@@ -1340,7 +1340,7 @@ namespace OpenSim.Data.MSSQL
1340 /// for us. 1340 /// for us.
1341 ///</summary> 1341 ///</summary>
1342 ///<returns>a built Sql parameter</returns> 1342 ///<returns>a built Sql parameter</returns>
1343 private SqlParameter createSqlParameter(string name, Type type) 1343 private static SqlParameter createSqlParameter(string name, Type type)
1344 { 1344 {
1345 SqlParameter param = new SqlParameter(); 1345 SqlParameter param = new SqlParameter();
1346 param.ParameterName = "@" + name; 1346 param.ParameterName = "@" + name;
@@ -1413,7 +1413,7 @@ namespace OpenSim.Data.MSSQL
1413 da.DeleteCommand = delete; 1413 da.DeleteCommand = delete;
1414 } 1414 }
1415 1415
1416 private void InitDB(SqlConnection conn) 1416 private static void InitDB(SqlConnection conn)
1417 { 1417 {
1418 string createPrims = defineTable(createPrimTable()); 1418 string createPrims = defineTable(createPrimTable());
1419 string createShapes = defineTable(createShapeTable()); 1419 string createShapes = defineTable(createShapeTable());
@@ -1586,7 +1586,7 @@ namespace OpenSim.Data.MSSQL
1586 * 1586 *
1587 **********************************************************************/ 1587 **********************************************************************/
1588 1588
1589 private DbType dbtypeFromType(Type type) 1589 private static DbType dbtypeFromType(Type type)
1590 { 1590 {
1591 if (type == typeof(String)) 1591 if (type == typeof(String))
1592 { 1592 {