a few fixes and cosmetics on some DB code

This commit is contained in:
UbitUmarov
2026-07-14 21:24:31 +01:00
parent 6ed9b246cf
commit 1b428a1825
6 changed files with 46 additions and 47 deletions

View File

@@ -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 = "";