* Matched up all previous .ToString() references (r2764) in OpenSim.Framework.Data.MySQL with Justincc's Util.ToRawUuidString()

afrisby
Teravus Ovares 2007-12-20 22:36:18 +00:00
parent 288e7def7d
commit 7cd8f808c8
1 changed files with 18 additions and 18 deletions

View File

@ -149,7 +149,7 @@ namespace OpenSim.Framework.Data.MySQL
DataTable prims = m_primTable; DataTable prims = m_primTable;
DataTable shapes = m_shapeTable; DataTable shapes = m_shapeTable;
string selectExp = "SceneGroupID = '" + obj.ToString() + "'"; string selectExp = "SceneGroupID = '" + Util.ToRawUuidString(obj) + "'";
lock (m_dataSet) lock (m_dataSet)
{ {
DataRow[] primRows = prims.Select(selectExp); DataRow[] primRows = prims.Select(selectExp);
@ -177,7 +177,7 @@ namespace OpenSim.Framework.Data.MySQL
DataTable prims = m_primTable; DataTable prims = m_primTable;
DataTable shapes = m_shapeTable; DataTable shapes = m_shapeTable;
string byRegion = "RegionUUID = '" + regionUUID.ToString() + "'"; string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'";
string orderByParent = "ParentID ASC"; string orderByParent = "ParentID ASC";
lock (m_dataSet) lock (m_dataSet)
@ -258,7 +258,7 @@ namespace OpenSim.Framework.Data.MySQL
using (cmd) using (cmd)
{ {
cmd.Parameters.Add(new MySqlParameter("?RegionUUID", regionID.ToString())); cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID)));
cmd.Parameters.Add(new MySqlParameter("?Revision", revision)); cmd.Parameters.Add(new MySqlParameter("?Revision", revision));
cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter))); cmd.Parameters.Add(new MySqlParameter("?Heightfield", serializeTerrain(ter)));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
@ -277,7 +277,7 @@ namespace OpenSim.Framework.Data.MySQL
, m_connection); , m_connection);
MySqlParameter param = new MySqlParameter(); MySqlParameter param = new MySqlParameter();
cmd.Parameters.Add(new MySqlParameter("?RegionUUID", regionID.ToString())); cmd.Parameters.Add(new MySqlParameter("?RegionUUID", Util.ToRawUuidString(regionID)));
if (m_connection.State != ConnectionState.Open) if (m_connection.State != ConnectionState.Open)
{ {
@ -317,13 +317,13 @@ namespace OpenSim.Framework.Data.MySQL
{ {
using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection)) using (MySqlCommand cmd = new MySqlCommand("delete from land where UUID=?UUID", m_connection))
{ {
cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString())); cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID)));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection)) using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?UUID", m_connection))
{ {
cmd.Parameters.Add(new MySqlParameter("?UUID", globalID.ToString())); cmd.Parameters.Add(new MySqlParameter("?UUID", Util.ToRawUuidString(globalID)));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
} }
@ -336,7 +336,7 @@ namespace OpenSim.Framework.Data.MySQL
DataTable land = m_landTable; DataTable land = m_landTable;
DataTable landaccesslist = m_landAccessListTable; DataTable landaccesslist = m_landAccessListTable;
DataRow landRow = land.Rows.Find(parcel.landData.globalID.ToString()); DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID));
if (landRow == null) if (landRow == null)
{ {
landRow = land.NewRow(); landRow = land.NewRow();
@ -350,7 +350,7 @@ namespace OpenSim.Framework.Data.MySQL
using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) using (MySqlCommand cmd = new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
{ {
cmd.Parameters.Add(new MySqlParameter("?LandUUID", parcel.landData.globalID.ToString())); cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID)));
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
@ -373,12 +373,12 @@ namespace OpenSim.Framework.Data.MySQL
{ {
DataTable land = m_landTable; DataTable land = m_landTable;
DataTable landaccesslist = m_landAccessListTable; DataTable landaccesslist = m_landAccessListTable;
string searchExp = "RegionUUID = '" + regionUUID.ToString() + "'"; string searchExp = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'";
DataRow[] rawDataForRegion = land.Select(searchExp); DataRow[] rawDataForRegion = land.Select(searchExp);
foreach (DataRow rawDataLand in rawDataForRegion) foreach (DataRow rawDataLand in rawDataForRegion)
{ {
LandData newLand = buildLandData(rawDataLand); LandData newLand = buildLandData(rawDataLand);
string accessListSearchExp = "LandUUID = '" + newLand.globalID.ToString() + "'"; string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'";
DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
{ {
@ -801,8 +801,8 @@ namespace OpenSim.Framework.Data.MySQL
private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{ {
row["UUID"] = land.globalID.ToString(); row["UUID"] = Util.ToRawUuidString(land.globalID);
row["RegionUUID"] = regionUUID.ToString(); row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
row["LocalLandID"] = land.localID; row["LocalLandID"] = land.localID;
// Bitmap is a byte[512] // Bitmap is a byte[512]
@ -810,25 +810,25 @@ namespace OpenSim.Framework.Data.MySQL
row["Name"] = land.landName; row["Name"] = land.landName;
row["Description"] = land.landDesc; row["Description"] = land.landDesc;
row["OwnerUUID"] = land.ownerID.ToString(); row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID);
row["IsGroupOwned"] = land.isGroupOwned; row["IsGroupOwned"] = land.isGroupOwned;
row["Area"] = land.area; row["Area"] = land.area;
row["AuctionID"] = land.auctionID; //Unemplemented row["AuctionID"] = land.auctionID; //Unemplemented
row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory
row["ClaimDate"] = land.claimDate; row["ClaimDate"] = land.claimDate;
row["ClaimPrice"] = land.claimPrice; row["ClaimPrice"] = land.claimPrice;
row["GroupUUID"] = land.groupID.ToString(); row["GroupUUID"] = Util.ToRawUuidString(land.groupID);
row["SalePrice"] = land.salePrice; row["SalePrice"] = land.salePrice;
row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus
row["LandFlags"] = land.landFlags; row["LandFlags"] = land.landFlags;
row["LandingType"] = land.landingType; row["LandingType"] = land.landingType;
row["MediaAutoScale"] = land.mediaAutoScale; row["MediaAutoScale"] = land.mediaAutoScale;
row["MediaTextureUUID"] = land.mediaID.ToString(); row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID);
row["MediaURL"] = land.mediaURL; row["MediaURL"] = land.mediaURL;
row["MusicURL"] = land.musicURL; row["MusicURL"] = land.musicURL;
row["PassHours"] = land.passHours; row["PassHours"] = land.passHours;
row["PassPrice"] = land.passPrice; row["PassPrice"] = land.passPrice;
row["SnapshotUUID"] = land.snapshotID.ToString(); row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID);
row["UserLocationX"] = land.userLocation.X; row["UserLocationX"] = land.userLocation.X;
row["UserLocationY"] = land.userLocation.Y; row["UserLocationY"] = land.userLocation.Y;
row["UserLocationZ"] = land.userLocation.Z; row["UserLocationZ"] = land.userLocation.Z;
@ -839,8 +839,8 @@ namespace OpenSim.Framework.Data.MySQL
private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID)
{ {
row["LandUUID"] = parcelID.ToString(); row["LandUUID"] = Util.ToRawUuidString(parcelID);
row["AccessUUID"] = entry.AgentID.ToString(); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
row["Flags"] = entry.Flags; row["Flags"] = entry.Flags;
} }