mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
a few fixes and cosmetics on some DB code
This commit is contained in:
@@ -224,7 +224,7 @@ namespace OpenSim.Data.PGSQL
|
||||
}
|
||||
if (PGFieldType == "boolean" || PGFieldType == "bit")
|
||||
{
|
||||
return (value.ToString() == "true");
|
||||
return "true".Equals(value.ToString(), StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
if (PGFieldType == "timestamp with time zone")
|
||||
{
|
||||
@@ -307,7 +307,7 @@ namespace OpenSim.Data.PGSQL
|
||||
internal NpgsqlParameter CreateParameter(string parameterName, object parameterObject, string PGFieldType)
|
||||
{
|
||||
//Tweak so we dont always have to add : sign
|
||||
if (parameterName.StartsWith(":")) parameterName = parameterName.Replace(":", "");
|
||||
if (parameterName.StartsWith(':')) parameterName = parameterName[1..];
|
||||
|
||||
//HACK if object is null, it is turned into a string, there are no nullable type till now
|
||||
if (parameterObject == null) parameterObject = "";
|
||||
|
||||
Reference in New Issue
Block a user